ClusterLabs/libqb — pull request #88 by r1mikey (2013-09-03 06:57:21+00:00)
Title: Fix sockaddr_un.sun_path overflow on Mac OS X 10.9

Use sizeof to get the correct size of the sockaddr_un.sun_path member in a portable way.

This gets Corosync up and limping on Mac OS X (10.9).

The configure process on Darwin ends up undefining UNIX_PATH_MAX, which is then "corrected" to 108 in lib/util_int.h. In Mac OS X 10.9 this value is actually 104, and the C library aborts based on the incorrect length specification.

UNIX_PATH_MAX is not actually needed, as we can simply use sizeof to get this size portably and correctly at compile time. If we change this for the Linux case too we can simply remove UNIX_PATH_MAX completely.