]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/maemo/sapwood/sockets.patch
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / maemo / sapwood / sockets.patch
1 --- configure.in.old    2005-06-10 17:04:52.000000000 +0200
2 +++ configure.in        2005-06-10 17:20:47.000000000 +0200
3 @@ -13,61 +13,61 @@
4  AC_PROG_MAKE_SET
5  
6  dnl abstract sockets namespace checks, from dbus
7 -AC_ARG_ENABLE(abstract-sockets,
8 -             [AC_HELP_STRING([--enable-abstract-sockets],
9 -                             [use abstract socket namespace (linux only)])],
10 -             [enable_abstract_sockets=$enableval],
11 -             [enable_abstract_sockets=auto])
12 -
13 -AC_MSG_CHECKING(abstract socket namespace)
14 -AC_RUN_IFELSE([AC_LANG_PROGRAM(
15 -[[
16 +#AC_ARG_ENABLE(abstract-sockets,
17 +#            [AC_HELP_STRING([--enable-abstract-sockets],
18 +#                            [use abstract socket namespace (linux only)])],
19 +#            [enable_abstract_sockets=$enableval],
20 +#            [enable_abstract_sockets=no])
21 +#
22 +#AC_MSG_CHECKING(abstract socket namespace)
23 +#AC_RUN_IFELSE([AC_LANG_PROGRAM(
24 +#[[
25  #include <sys/types.h>
26  #include <stdlib.h>
27  #include <stdio.h>
28  #include <sys/socket.h>
29  #include <sys/un.h>
30  #include <errno.h>
31 -]],
32 -[[
33 -  int listen_fd;
34 -  struct sockaddr_un addr;
35 -
36 -  listen_fd = socket (PF_UNIX, SOCK_STREAM, 0);
37 -
38 -  if (listen_fd < 0)
39 -    {
40 -      fprintf (stderr, "socket() failed: %s\n", strerror (errno));
41 -      exit (1);
42 -    }
43 -
44 -  memset (&addr, '\0', sizeof (addr));
45 -  addr.sun_family = AF_UNIX;
46 -  strcpy (addr.sun_path, "X/tmp/sapwood-fake-socket-path-used-in-configure-test");
47 -  addr.sun_path[0] = '\0'; /* this is what makes it abstract */
48 -
49 -  if (bind (listen_fd, (struct sockaddr*) &addr, SUN_LEN (&addr)) < 0)
50 -    {
51 -      fprintf (stderr, "Abstract socket namespace bind() failed: %s\n",
52 -               strerror (errno));
53 -      exit (1);
54 -    }
55 -  else
56 -    exit (0);
57 -]])],
58 -  [have_abstract_sockets=yes],
59 -  [have_abstract_sockets=no])
60 -AC_MSG_RESULT($have_abstract_sockets)
61 -
62 -if test x$enable_abstract_sockets = xyes; then
63 -  if test x$have_abstract_sockets = xno; then
64 -    AC_MSG_ERROR([Abstract sockets explicitly required, and support not detected.])
65 -  fi
66 -fi
67 -
68 -if test x$enable_abstract_sockets = xno; then
69 -  have_abstract_sockets=no
70 -fi
71 +#]],
72 +#[[
73 +#  int listen_fd;
74 +#  struct sockaddr_un addr;
75 +#
76 +#  listen_fd = socket (PF_UNIX, SOCK_STREAM, 0);
77 +
78 +#  if (listen_fd < 0)
79 +#    {
80 +#      fprintf (stderr, "socket() failed: %s\n", strerror (errno));
81 +#      exit (1);
82 +#   }
83 +#
84 +#  memset (&addr, '\0', sizeof (addr));
85 +#  addr.sun_family = AF_UNIX;
86 +#  strcpy (addr.sun_path, "X/tmp/sapwood-fake-socket-path-used-in-configure-test");
87 +#  addr.sun_path[0] = '\0'; /* this is what makes it abstract */
88 +#
89 +#  if (bind (listen_fd, (struct sockaddr*) &addr, SUN_LEN (&addr)) < 0)
90 +#    {
91 +#      fprintf (stderr, "Abstract socket namespace bind() failed: %s\n",
92 +#               strerror (errno));
93 +#      exit (1);
94 +#    }
95 +#  else
96 +#    exit (0);
97 +#]])],
98 +#  [have_abstract_sockets=no],
99 +#  [have_abstract_sockets=no])
100 +#AC_MSG_RESULT($have_abstract_sockets)
101 +
102 +#if test x$enable_abstract_sockets = xyes; then
103 +#  if test x$have_abstract_sockets = xno; then
104 +#    AC_MSG_ERROR([Abstract sockets explicitly required, and support not detected.])
105 +#  fi
106 +#fi
107 +
108 +#if test x$enable_abstract_sockets = xno; then
109 +have_abstract_sockets=no
110 +#fi
111  
112  if test x$have_abstract_sockets = xyes; then
113    AC_DEFINE(HAVE_ABSTRACT_SOCKETS,1,[Have abstract socket namespace])