diff options
author | David Zeuthen <davidz@redhat.com> | 2009-11-08 12:25:55 -0500 |
---|---|---|
committer | David Zeuthen <davidz@redhat.com> | 2009-11-08 12:31:35 -0500 |
commit | 4e3664f22b39c3efa33f5778a651a083b5e1f544 (patch) | |
tree | 16fbba2a4bec1363bb13ac07c1dc9405664e1e94 /extras | |
parent | 368d325ba8a53090a3bb71cbdbe25e11d70fff02 (diff) |
gudev: Fix up GUdevDeviceNumber
Actually dev_t is an unsigned quad type (e.g. 64-bit even on 32-bit
x86) so defining it to be an integer is wrong and not future
proof. Thus, redefine it to actually be a dev_t (as originally wanted)
and instead add a work-around for GNOME bug #584517, see
https://bugzilla.gnome.org/show_bug.cgi?id=584517
for details. This way, GObject Introspection will still work.
This change is technically an API/ABI break but
- all released GUdev versions requires the user to understand that
the API/ABI is unstable by requiring the G_UDEV_API_IS_SUBJECT_TO_CHANGE
symbols to be defined
- functions using GUdevDeviceNumber are rarely used
so we don't bump the so number.
Signed-off-by: David Zeuthen <davidz@redhat.com>
Diffstat (limited to 'extras')
-rw-r--r-- | extras/gudev/gudevtypes.h | 9 |
1 files changed, 7 insertions, 2 deletions
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 |