0001-no-abstract-sockets.patch 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. [PATCH]: Remove abstract socket namespace check breaking cross compilation
  2. Taken from openembedded:
  3. http://git.openembedded.org/cgit.cgi/openembedded/tree/recipes/gamin/files/no-abstract-sockets.patch
  4. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
  5. --- /tmp/configure.in 2007-04-30 13:08:49.000000000 +0200
  6. +++ gamin-0.1.8/configure.in 2007-04-30 13:10:53.285251000 +0200
  7. @@ -354,51 +354,6 @@
  8. AC_DEFINE(HAVE_CMSGCRED,1,[Have cmsgcred structure])
  9. fi
  10. -#### Abstract sockets
  11. -
  12. -AC_MSG_CHECKING(abstract socket namespace)
  13. -AC_LANG_PUSH(C)
  14. -AC_RUN_IFELSE([AC_LANG_PROGRAM(
  15. -[[
  16. -#include <sys/types.h>
  17. -#include <stdlib.h>
  18. -#include <string.h>
  19. -#include <stdio.h>
  20. -#include <sys/socket.h>
  21. -#include <sys/un.h>
  22. -#include <errno.h>
  23. -]],
  24. -[[
  25. - int listen_fd;
  26. - struct sockaddr_un addr;
  27. -
  28. - listen_fd = socket (PF_UNIX, SOCK_STREAM, 0);
  29. -
  30. - if (listen_fd < 0)
  31. - {
  32. - fprintf (stderr, "socket() failed: %s\n", strerror (errno));
  33. - exit (1);
  34. - }
  35. -
  36. - memset (&addr, '\0', sizeof (addr));
  37. - addr.sun_family = AF_UNIX;
  38. - strcpy (addr.sun_path, "X/tmp/dbus-fake-socket-path-used-in-configure-test");
  39. - addr.sun_path[0] = '\0'; /* this is what makes it abstract */
  40. -
  41. - if (bind (listen_fd, (struct sockaddr*) &addr, SUN_LEN (&addr)) < 0)
  42. - {
  43. - fprintf (stderr, "Abstract socket namespace bind() failed: %s\n",
  44. - strerror (errno));
  45. - exit (1);
  46. - }
  47. - else
  48. - exit (0);
  49. -]])],
  50. - [have_abstract_sockets=yes],
  51. - [have_abstract_sockets=no])
  52. -AC_LANG_POP(C)
  53. -AC_MSG_RESULT($have_abstract_sockets)
  54. -
  55. if test x$enable_abstract_sockets = xyes; then
  56. if test x$have_abstract_sockets = xno; then
  57. AC_MSG_ERROR([Abstract sockets explicitly required, and support not detected.])