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 454777 - Missing MAXPATHLEN declaration
Missing MAXPATHLEN declaration
Status: RESOLVED FIXED
Product: gdm
Classification: Core
Component: general
2.19.x
Other Linux
: Immediate normal
: ---
Assigned To: GDM maintainers
GDM maintainers
Depends on:
Blocks:
 
 
Reported: 2007-07-08 09:21 UTC by Laurent Goujon
Modified: 2007-07-09 19:53 UTC
See Also:
GNOME target: ---
GNOME version: 2.19/2.20


Attachments
Simple fix (425 bytes, patch)
2007-07-08 09:28 UTC, Laurent Goujon
none Details | Review

Description Laurent Goujon 2007-07-08 09:21:54 UTC
Hi,

I'm unable to build gdm from HEAD (using jhbuild).
Here's the error message:

make[2]: Entering directory `/opt/svn/gnome2/gdm2/daemon'
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I. -I.. -I../common -DAUTHDIR=\"/opt/gnome2/var/gdm\" -DBINDIR=\"/opt/gnome2/bin\" -DDATADIR=\"/opt/gnome2/share\" -DDMCONFDIR=\"/opt/gnome2/etc/dm\" -DGDMCONFDIR=\"/opt/gnome2/etc/gdm\" -DGDMLOCALEDIR=\"/opt/gnome2/etc/gdm\" -DLIBDIR=\"/opt/gnome2/lib64\" -DLIBEXECDIR=\"/opt/gnome2/libexec\" -DLOGDIR=\"/var/log/gdm\" -DPIXMAPDIR=\"/opt/gnome2/share/pixmaps\" -DSBINDIR=\"/opt/gnome2/sbin\" -DGNOMELOCALEDIR=\""/opt/gnome2/share/locale"\" -DGDM_DEFAULTS_CONF=\"/opt/gnome2/share/gdm/defaults.conf\" -DGDM_CUSTOM_CONF=\"/opt/gnome2/etc/gdm/custom.conf\" -DGDM_OLD_CONF=\"/opt/gnome2/etc/gdm/gdm.conf\" -DPNG_NO_MMX_CODE -I/opt/gnome2/include/gtk-2.0 -I/opt/gnome2/lib64/gtk-2.0/include -I/opt/gnome2/include/atk-1.0 -I/opt/gnome2/include/cairo -I/opt/gnome2/include/pango-1.0 -I/opt/gnome2/include/glib-2.0 -I/opt/gnome2/lib64/glib-2.0/include -I/opt/gnome2/include -I/opt/gnome2/include/libglade-2.0 -I/opt/gnome2/include/libxml2 -I/usr/include/freetype2 -I/usr/include/libpng12   -DPNG_NO_MMX_CODE -I/opt/gnome2/include/gtk-2.0 -I/opt/gnome2/lib64/gtk-2.0/include -I/opt/gnome2/include/atk-1.0 -I/opt/gnome2/include/cairo -I/opt/gnome2/include/pango-1.0 -I/opt/gnome2/include/glib-2.0 -I/opt/gnome2/lib64/glib-2.0/include -I/opt/gnome2/include -I/usr/include/freetype2 -I/usr/include/libpng12   -DLANG_CONFIG_FILE=\"/opt/gnome2/etc/sysconfig/i18n\"  -DGREETERTHEMEDIR=\""/opt/gnome2/share/gdm/themes"\"  -I/opt/gnome2/include/dbus-1.0 -I/opt/gnome2/lib64/dbus-1.0/include -I/opt/gnome2/include/glib-2.0 -I/opt/gnome2/lib64/glib-2.0/include      -Wall         -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes         -Wnested-externs -Wpointer-arith         -Wcast-align -Wsign-compare         -g -O2 -Wall -Wmissing-prototypes  -Wno-strict-aliasing -Wno-sign-compare -MT slave.o -MD -MP -MF ".deps/slave.Tpo" -c -o slave.o slave.c; \
        then mv -f ".deps/slave.Tpo" ".deps/slave.Po"; else rm -f ".deps/slave.Tpo"; exit 1; fi
slave.c:4067: warning: no previous prototype for 'gdm_slave_parse_enriched_string'
slave.c: In function 'gdm_slave_update_pseudo_device':
slave.c:4124: error: 'MAXPATHLEN' undeclared (first use in this function)
slave.c:4124: error: (Each undeclared identifier is reported only once
slave.c:4124: error: for each function it appears in.)
slave.c:4124: warning: unused variable 'buf'
slave.c:4108: warning: unused variable 'pseudo_device'
slave.c: In function 'gdm_slave_write_utmp_wtmp_record':
slave.c:4238: warning: field precision should have type 'int', but argument 4 has type 'long unsigned int'
slave.c:4259: warning: field precision should have type 'int', but argument 4 has type 'long unsigned int'
slave.c:4271: warning: field precision should have type 'int', but argument 4 has type 'long unsigned int'
slave.c:4288: warning: field precision should have type 'int', but argument 4 has type 'long unsigned int'
make[2]: *** [slave.o] Error 1
Comment 1 Laurent Goujon 2007-07-08 09:28:08 UTC
Created attachment 91402 [details] [review]
Simple fix

Created a simple patch to fix the issue: it checks if MAXPATHLEN is defined and otherwise try to use PATH_MAX (which should be defined on GNU systems)
Comment 2 Marc-Andre Lureau 2007-07-08 11:18:02 UTC
+1

(laurent: on dirait qu'on passe un bout du week end a compiler gnome ;)
Comment 3 Elijah Newren 2007-07-09 01:15:49 UTC
Build bug -> bumping priority.  Thanks for the patch to fix this, Laurent.  :-)
Comment 4 Brian Cameron 2007-07-09 19:53:17 UTC
Thanks.  Fixed in SVN head.