The lack of UNIX_PATH_MAX on sys/un.h

Thu Dec 7 21:33:00 GMT 2017


Recently I have been modifying some of my old code (a UNIX socket based server), and
have begun using another library that is using sys/un.h.

The problem is I was already using linux/un.h and now I face the following error:

/usr/include/linux/un.h:8:8: error: redefinition of ‘struct sockaddr_un’
 struct sockaddr_un {
In file included from test.c:1:0:
/usr/include/x86_64-linux-gnu/sys/un.h:29:8: note: originally defined here
 struct sockaddr_un

The change to use sys/un.h is fairly trivial but I was using the UNIX_PATH_MAX

Is there any reason this isn't defined in glibc? are there any reservations from adding it?

Thanks in advance,
Omri Arad.

More information about the Libc-help mailing list