GNOME Bugzilla – Bug 591937
ENODATA not available on FreeBSD
Last modified: 2010-05-24 22:01:08 UTC
Building GDM on FreeBSD 7.2 results in the following error: gmake[3]: Entering directory `/space/buildbot/checkout/gnome2/gdm/common' libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I. -I.. -DGNOMELOCALEDIR=\"/space/buildbot/prefix/share/locale\" -DAUTHDIR=\"/space/buildbot/prefix/var/gdm\" -DBINDIR=\"/space/buildbot/prefix/bin\" -DDATADIR=\"/space/buildbot/prefix/share\" -DDMCONFDIR=\"/space/buildbot/prefix/etc/dm\" -DGDMCONFDIR=\"/space/buildbot/prefix/etc/gdm\" -DGDMLOCALEDIR=\"/space/buildbot/prefix/etc/gdm\" -DLIBDIR=\"/space/buildbot/prefix/lib\" -DLIBEXECDIR=\"/space/buildbot/prefix/libexec\" -DLOGDIR=\"/var/log/gdm\" -DPIXMAPDIR=\"/space/buildbot/prefix/share/pixmaps\" -DSBINDIR=\"/space/buildbot/prefix/sbin\" -DGNOMELOCALEDIR=\"/space/buildbot/prefix/share/locale\" -DGDM_DEFAULTS_CONF=\"/space/buildbot/prefix/share/gdm/defaults.conf\" -DGDM_CUSTOM_CONF=\"/space/buildbot/prefix/etc/gdm/custom.conf\" -DGDM_OLD_CONF=\"/space/buildbot/prefix/etc/gdm/gdm.conf\" -I/space/buildbot/prefix/include/dbus-1.0 -I/space/buildbot/prefix/lib/dbus-1.0/include -I/space/buildbot/prefix/include/glib-2.0 -I/space/buildbot/prefix/lib/glib-2.0/include -I/usr/local/include -I/space/buildbot/prefix/include/dbus-1.0 -I/space/buildbot/prefix/lib/dbus-1.0/include -I/space/buildbot/prefix/include/glib-2.0 -I/space/buildbot/prefix/lib/glib-2.0/include -g -O2 -MT libgdmcommon_la-gdm-common.lo -MD -MP -MF .deps/libgdmcommon_la-gdm-common.Tpo -c gdm-common.c -fPIC -DPIC -o .libs/libgdmcommon_la-gdm-common.o gdm-common.c: In function '_read_bytes': gdm-common.c:386: error: 'ENODATA' undeclared (first use in this function) The FreeBSD developers have fixed this by defining ENODATA to EAGAIN - see http://www.freebsd.org/cgi/cvsweb.cgi/ports/x11/gdm/files/patch-common_gdm-common.c?rev=1.1;content-type=text%2Fplain (uname: FreeBSD musdea.ucc.gu.uwa.edu.au 7.2-RELEASE-p1 FreeBSD 7.2-RELEASE-p1 #0: Tue Jun 9 21:30:43 UTC 2009 root@i386-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC i386)
Created attachment 159723 [details] [review] Work even without ENODATA This workaround gets gdm to build on FreeBSD. However, it’s not the correct way. Quoting the GIO documentation: “Unlike errno codes, GFileError values are available on all systems, even Windows.“ Using errno codes to define the errors defeats the point of having a portable GFileError.
we probably don't need an #ifdef here. just change it to be the #else part all the time.
Fixed in master.