Skip to contentSkip to conversation

Ensure sys/un.h autoconf detection includes sys/socket.h

PATCH In review Adriaan de Jong 3 participants 5 messages Apr 12, 2012 – Apr 26, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Ensure sys/un.h autoconf detection includes sys/socket.h

This is required to build an Android binary.

---
 configure.ac |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
configure.ac +2 -2
index 70c51e7..dc5bb43 100644
@@ -363,7 +363,7 @@ AC_CHECK_HEADERS([ \
 	windows.h winsock2.h ws2tcpip.h \
 ])
 AC_CHECK_HEADERS([ \
-	sys/time.h sys/un.h sys/ioctl.h sys/stat.h \
+	sys/time.h sys/ioctl.h sys/stat.h \
 	sys/mman.h sys/file.h \
 	unistd.h signal.h libgen.h stropts.h \
 	syslog.h pwd.h grp.h \
@@ -399,7 +399,7 @@ SOCKET_INCLUDES="
 "
 
 AC_CHECK_HEADERS(
-	[net/if.h netinet/ip.h netinet/if_ether.h resolv.h],
+	[net/if.h netinet/ip.h netinet/if_ether.h resolv.h sys/un.h],
 	,
 	,
 	[[${SOCKET_INCLUDES}]]
Signature · 1 line
1.7.5.4
#1 lore raw

This is strange!
As there is nothing in this file that needs dependency. Can you please send me config.log and the un.h file for me to learn?

Quoted 42 lines · Adriaan de Jong

This is required to build an Android binary.

---
 configure.ac |    4 ++--

 1 files changed, 2 insertions(+), 2 deletions(-)
configure.ac +1 -1
index 70c51e7..dc5bb43 100644
@@ -363,7 +363,7 @@ AC_CHECK_HEADERS([ \
        windows.h winsock2.h ws2tcpip.h \
  ])
  AC_CHECK_HEADERS([ \
-       sys/time.h sys/un.h sys/ioctl.h sys/stat.h \
+       sys/time.h sys/ioctl.h sys/stat.h \
        sys/mman.h sys/file.h \
        unistd.h signal.h libgen.h stropts.h \
        syslog.h pwd.h grp.h \
@@ -399,7 +399,7 @@ SOCKET_INCLUDES="

 "

 AC_CHECK_HEADERS(
-       [net/if.h netinet/ip.h netinet/if_ether.h resolv.h],
+       [net/if.h netinet/ip.h netinet/if_ether.h resolv.h sys/un.h], ,
       ,
       [[${SOCKET_INCLUDES}]]
--
1.7.5.4

------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Openvpn-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

#2 lore raw

There is on Android:

- sys/un.h includes linux/un.h
- linux/un.h uses sa_family_t
- sa_family_t is defined in linux/socket.h
- which is included from sys/socket.h

Therefore, sys/socket.h is required for linux/un.h...

Hope that clarifies things,
Adriaan

-----Original Message-----
From: Alon Bar-Lev [mailto:[email protected]...]
Sent: zaterdag 14 april 2012 18:58
To: Adriaan de Jong
Cc: [email protected]
Subject: Re: [Openvpn-devel] [PATCH] Ensure sys/un.h autoconf detection includes sys/socket.h

This is strange!
As there is nothing in this file that needs dependency. Can you please send me config.log and the un.h file for me to learn?

Quoted 41 lines · Adriaan de Jong

This is required to build an Android binary.

---
 configure.ac |    4 ++--

 1 files changed, 2 insertions(+), 2 deletions(-)
configure.ac +1 -1
@@ -363,7 +363,7 @@ AC_CHECK_HEADERS([ \
        windows.h winsock2.h ws2tcpip.h \
  ])
  AC_CHECK_HEADERS([ \
-       sys/time.h sys/un.h sys/ioctl.h sys/stat.h \
+       sys/time.h sys/ioctl.h sys/stat.h \
        sys/mman.h sys/file.h \
        unistd.h signal.h libgen.h stropts.h \
        syslog.h pwd.h grp.h \
@@ -399,7 +399,7 @@ SOCKET_INCLUDES="

 "

 AC_CHECK_HEADERS(
-       [net/if.h netinet/ip.h netinet/if_ether.h resolv.h],
+       [net/if.h netinet/ip.h netinet/if_ether.h resolv.h sys/un.h], ,
       ,
       [[${SOCKET_INCLUDES}]]
--
1.7.5.4

----------------------------------------------------------------------
-------- For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Openvpn-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

#3 lore raw

Thanks for explanation.
David, please apply.

Quoted 66 lines · Adriaan de Jong

There is on Android:

 - sys/un.h includes linux/un.h
 - linux/un.h uses sa_family_t
 - sa_family_t is defined in linux/socket.h
 - which is included from sys/socket.h

Therefore, sys/socket.h is required for linux/un.h...

Hope that clarifies things,
Adriaan

-----Original Message-----
From: Alon Bar-Lev [mailto:[email protected]...]
Sent: zaterdag 14 april 2012 18:58
To: Adriaan de Jong
Cc: [email protected]
Subject: Re: [Openvpn-devel] [PATCH] Ensure sys/un.h autoconf detection includes sys/socket.h

This is strange!
As there is nothing in this file that needs dependency. Can you please send me config.log and the un.h file for me to learn?

Quoted 41 lines · Adriaan de Jong

This is required to build an Android binary.

---
 configure.ac |    4 ++--

 1 files changed, 2 insertions(+), 2 deletions(-)
configure.ac +1 -1
@@ -363,7 +363,7 @@ AC_CHECK_HEADERS([ \
        windows.h winsock2.h ws2tcpip.h \
  ])
  AC_CHECK_HEADERS([ \
-       sys/time.h sys/un.h sys/ioctl.h sys/stat.h \
+       sys/time.h sys/ioctl.h sys/stat.h \
        sys/mman.h sys/file.h \
        unistd.h signal.h libgen.h stropts.h \
        syslog.h pwd.h grp.h \
@@ -399,7 +399,7 @@ SOCKET_INCLUDES="

 "

 AC_CHECK_HEADERS(
-       [net/if.h netinet/ip.h netinet/if_ether.h resolv.h],
+       [net/if.h netinet/ip.h netinet/if_ether.h resolv.h sys/un.h], ,
       ,
       [[${SOCKET_INCLUDES}]]
--
1.7.5.4

----------------------------------------------------------------------
-------- For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Openvpn-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

#4 lore raw
In reply to Adriaan de Jong

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 4 lines · Adriaan de Jong

This is required to build an Android binary.

| 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)

Applied to master on -testing and -stable trees.

commit a2d747bb0397c5837ec2c80ae9a3c3267acbdb2c

Author: Adriaan de Jong <[email protected]...>
Date:   Thu Apr 12 08:50:12 2012 +0200
    Ensure sys/un.h autoconf detection includes sys/socket.h

    Signed-off-by: Adriaan de Jong <[email protected]...>
    Acked-by: Alon Bar-Lev <[email protected]...>
    Signed-off-by: David Sommerseth <[email protected]...>

kind regards,

David Sommerseth
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk+ZnwkACgkQDC186MBRfrrdOgCfV9iH6r3UfSJllao6AnKXMGNf qyMAn3dwIgCiDTNY5G3k4ZrTBToo6VWo
=dtCQ
-----END PGP SIGNATURE-----