summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am2
-rw-r--r--extras/gudev/gudevtypes.h9
2 files changed, 8 insertions, 3 deletions
diff --git a/Makefile.am b/Makefile.am
index 2185614c43..92598a60c2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -378,7 +378,7 @@ extras/gudev/GUdev-1.0.gir: extras/gudev/libgudev-1.0.la $(G_IR_SCANNER) Makefil
--pkg=gobject-2.0 \
-I$(top_srcdir)/extras \
-D_GUDEV_COMPILATION \
- -DG_UDEV_API_IS_SUBJECT_TO_CHANGE \
+ -D_GUDEV_WORK_AROUND_DEV_T_BUG \
$(top_srcdir)/extras/gudev/gudev.h \
$(top_srcdir)/extras/gudev/gudevtypes.h \
$(top_srcdir)/extras/gudev/gudevenums.h \
diff --git a/extras/gudev/gudevtypes.h b/extras/gudev/gudevtypes.h
index 66156723f2..b95cf97529 100644
--- a/extras/gudev/gudevtypes.h
+++ b/extras/gudev/gudevtypes.h
@@ -26,6 +26,7 @@
#define __G_UDEV_TYPES_H__
#include <gudev/gudevenums.h>
+#include <sys/types.h>
G_BEGIN_DECLS
@@ -36,9 +37,13 @@ typedef struct _GUdevDevice GUdevDevice;
* GUdevDeviceNumber:
*
* Corresponds to the standard #dev_t type as defined by POSIX (Until
- * bug 584517 is resolved this is aliased to an integer).
+ * bug 584517 is resolved this work-around is needed).
*/
-typedef int GUdevDeviceNumber;
+#ifdef _GUDEV_WORK_AROUND_DEV_T_BUG
+typedef guint64 GUdevDeviceNumber; /* __UQUAD_TYPE */
+#else
+typedef dev_t GUdevDeviceNumber;
+#endif
G_END_DECLS