mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-01 06:33:41 +02:00
Add and use G_SIZEOF_MEMBER() macro
A convenient macro present in the Linux kernel, named FIELD_SIZE() there. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
This commit is contained in:
@@ -67,7 +67,7 @@ enum
|
||||
};
|
||||
|
||||
#ifndef UNIX_PATH_MAX
|
||||
#define UNIX_PATH_MAX sizeof (((struct sockaddr_un *) 0)->sun_path)
|
||||
#define UNIX_PATH_MAX G_SIZEOF_MEMBER (struct sockaddr_un, sun_path)
|
||||
#endif
|
||||
|
||||
struct _GUnixSocketAddressPrivate
|
||||
|
Reference in New Issue
Block a user