]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
STABLE14-socklen-t-check-20090316
authorDerrick Brashear <shadow@dementia.org>
Fri, 20 Mar 2009 13:53:09 +0000 (13:53 +0000)
committerDerrick Brashear <shadow@dementia.org>
Fri, 20 Mar 2009 13:53:09 +0000 (13:53 +0000)
LICENSE IPL10

verify we have socklen_t and if not, get it

(cherry picked from commit 2d683a880bf5f30db22862f0f6add14142dbcf9a)

src/cf/socklen.m4 [new file with mode: 0644]

diff --git a/src/cf/socklen.m4 b/src/cf/socklen.m4
new file mode 100644 (file)
index 0000000..50ee10f
--- /dev/null
@@ -0,0 +1,18 @@
+AC_DEFUN([AC_TYPE_SOCKLEN_T],
+[
+AC_CACHE_CHECK([for socklen_t], 
+ac_cv_type_socklen_t, [
+        AC_TRY_COMPILE([
+                      #include <sys/types.h>
+                      #include <sys/socket.h>
+              ],
+              [
+                      socklen_t len = 42; return 0;
+              ],
+              ac_cv_type_socklen_t="yes", ac_cv_type_socklen_t="no")
+        ])
+
+        if test "x$ac_cv_type_socklen_t" = "xno"; then
+              AC_DEFINE(socklen_t, int, [the type of the last argument to getsockopt etc])
+        fi
+])