After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 169264 - gnome-panel-2.9.92 fails to compile on Solaris 8
gnome-panel-2.9.92 fails to compile on Solaris 8
Status: RESOLVED FIXED
Product: gnome-panel
Classification: Other
Component: general
2.9.x
Other Solaris
: High normal
: ---
Assigned To: Panel Maintainers
Panel Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-03-05 03:21 UTC by David
Modified: 2015-03-24 13:00 UTC
See Also:
GNOME target: ---
GNOME version: 2.9/2.10


Attachments
Good patch (2.93 KB, patch)
2005-03-05 09:40 UTC, Vincent Untz
committed Details | Review

Description David 2005-03-05 03:21:29 UTC
Distribution/Version: 5.8

$ configure --prefix=/usr
  ...
$ gmake

the make fails with the following errors:

panel-run-dialog.c: In function `fill_files_from':
panel-run-dialog.c:1126: error: structure has no member named `d_type'
panel-run-dialog.c:1126: error: `DT_DIR' undeclared (first use in this function)
panel-run-dialog.c:1126: error: (Each undeclared identifier is reported only once
panel-run-dialog.c:1126: error: for each function it appears in.)
panel-run-dialog.c:1127: error: structure has no member named `d_type'
panel-run-dialog.c:1127: error: `DT_LNK' undeclared (first use in this function)


the /usr/include/dirent.h on this system is smaller than on linux I guess, so
the solution is to use lstat() system call to determine if the file is a
directory or link

the following patch for panel-run-dialog.c seems to solve the problem:

38,39d37
< #include <sys/param.h>
< #include <sys/stat.h>
1108,1110d1105
< #if defined(solaris)
<       struct stat *s;
< #endif
1131,1135d1125
< #if defined(solaris)
<               lstat(file, s);
<               if (s->st_mode == S_IFDIR ||
<                       (s->st_mode == S_IFLNK &&
< #else
1138d1127
< #endif

and adding

#define solaris 1

somewhere, say in config.h

I know that config.h is generated but I am not that familiar with "configure"
script to be able to change it I'm sure someone here can pick it up and
intergrate it properly
Comment 1 Vincent Untz 2005-03-05 09:40:17 UTC
Created attachment 38287 [details] [review]
Good patch
Comment 2 Vincent Untz 2005-03-05 09:41:00 UTC
David: thanks for your patch. Could you try the patch I attached and see if it
fixes the problem?

Thanks
Comment 3 Vincent Untz 2005-03-07 17:54:41 UTC
I committed the patch to HEAD. This will be in 2.10.1.
Comment 4 David 2005-03-09 14:17:40 UTC
Looks good to me, thak you