diff options
Diffstat (limited to 'cmake/modules/CheckForAbstractSockets.c')
-rw-r--r-- | cmake/modules/CheckForAbstractSockets.c | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/cmake/modules/CheckForAbstractSockets.c b/cmake/modules/CheckForAbstractSockets.c deleted file mode 100644 index 062b846c..00000000 --- a/cmake/modules/CheckForAbstractSockets.c +++ /dev/null @@ -1,33 +0,0 @@ -#include <stdlib.h> -#include <string.h> -#include <stdio.h> -#include <sys/socket.h> -#include <sys/un.h> -#include <errno.h> - -int main() { - int listen_fd; - struct sockaddr_un addr; - - listen_fd = socket (PF_UNIX, SOCK_STREAM, 0); - - if (listen_fd < 0) - { - fprintf (stderr, "socket() failed: %s\n", strerror (errno)); - exit (1); - } - - memset (&addr, '\0', sizeof (addr)); - addr.sun_family = AF_UNIX; - strcpy (addr.sun_path, "X/tmp/dbus-fake-socket-path-used-in-configure-test"); - addr.sun_path[0] = '\0'; /* this is what makes it abstract */ - - if (bind (listen_fd, (struct sockaddr*) &addr, SUN_LEN (&addr)) < 0) - { - fprintf (stderr, "Abstract socket namespace bind() failed: %s\n", - strerror (errno)); - exit (1); - } - else - exit (0); -}
\ No newline at end of file |