GNOME Bugzilla – Bug 637013
gio/gdbusmessage.c fails to compile on Solaris
Last modified: 2011-01-29 01:51:42 UTC
Tested on Solaris 10 update 9 with GCC 4.5.1. gio/gdbusmessage.c uses the macros minor() and major() but fails to include <sys/mkdev.h> where they are defined. The following trivial patch fixes the issue, but perhaps an autoconf check is needed. --- gio/gdbusmessage.c.old 2010-11-22 12:29:06.933084000 +0000 +++ gio/gdbusmessage.c 2010-11-22 12:29:22.611336000 +0000 @@ -32,6 +32,7 @@ #ifdef HAVE_UNISTD_H #include <unistd.h> #endif +#include <sys/mkdev.h> #include "gdbusutils.h" #include "gdbusmessage.h"
Sorry, I forgot to mention: this is with glib 2.26.1.
my manpage says: NAME makedev, major, minor - manage a device number SYNOPSIS #define _BSD_SOURCE /* See feature_test_macros(7) */ #include <sys/types.h> dev_t makedev(int maj, int min); int major(dev_t dev); int minor(dev_t dev); So, I guess this will need a configure check to find out how to get major/minor.
Solaris: NAME makedev, major, minor - manage a device number SYNOPSIS #include <sys/types.h> #include <sys/mkdev.h> dev_t makedev(major_t maj, minor_t min); major_t major(dev_t device); minor_t minor(dev_t device);
Created attachment 179056 [details] [review] solaris sys/mkdev.h patch This is the full patch, independently created from this bug.