Update to network-2.4.2.3.
This commit is contained in:
parent
5ead8ec6c1
commit
1b2a434c87
@ -1,10 +1,10 @@
|
||||
# $OpenBSD: Makefile,v 1.23 2014/06/19 18:58:01 kili Exp $
|
||||
# $OpenBSD: Makefile,v 1.24 2014/11/22 20:48:00 kili Exp $
|
||||
|
||||
COMMENT = Haskell networking library
|
||||
|
||||
# Dependency of meta/haskell-platform.
|
||||
# Please do *not* update without thinking.
|
||||
DISTNAME = network-2.4.1.2
|
||||
DISTNAME = network-2.4.2.3
|
||||
CATEGORIES = devel net
|
||||
|
||||
MAINTAINER = Matthias Kilian <kili@openbsd.org>
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA256 (ghc/network-2.4.1.2.tar.gz) = sE3FZUJCi8kvESY/UAs62C5qB4eAVgFHLVmvfnab/jg=
|
||||
SIZE (ghc/network-2.4.1.2.tar.gz) = 140424
|
||||
SHA256 (ghc/network-2.4.2.3.tar.gz) = gBucZS2uYmv0qWF1FisSkOf+f/INgC1iQ01a4dNjwW0=
|
||||
SIZE (ghc/network-2.4.2.3.tar.gz) = 141749
|
||||
|
@ -1,11 +0,0 @@
|
||||
$OpenBSD: patch-Network_Socket_ByteString_IOVec_hsc,v 1.2 2013/07/18 21:48:49 kili Exp $
|
||||
--- Network/Socket/ByteString/IOVec.hsc.orig Fri Feb 22 01:03:06 2013
|
||||
+++ Network/Socket/ByteString/IOVec.hsc Mon Jul 8 15:27:10 2013
|
||||
@@ -9,6 +9,7 @@ import Foreign.C.Types (CChar, CInt, CSize)
|
||||
import Foreign.Ptr (Ptr)
|
||||
import Foreign.Storable (Storable(..))
|
||||
|
||||
+#include <sys/types.h>
|
||||
#include <sys/uio.h>
|
||||
|
||||
data IOVec = IOVec
|
@ -1,20 +1,9 @@
|
||||
$OpenBSD: patch-Network_Socket_hsc,v 1.4 2013/07/18 21:48:49 kili Exp $
|
||||
|
||||
ucred is sockpeercred on OpenBSD
|
||||
$OpenBSD: patch-Network_Socket_hsc,v 1.5 2014/11/22 20:48:00 kili Exp $
|
||||
|
||||
don't throw an error when attempting to setsockopt IPV6_V6ONLY
|
||||
|
||||
--- Network/Socket.hsc.orig Fri Feb 22 01:03:06 2013
|
||||
+++ Network/Socket.hsc Mon Jul 8 15:32:32 2013
|
||||
@@ -82,7 +82,7 @@ module Network.Socket
|
||||
, getPeerName
|
||||
, getSocketName
|
||||
|
||||
-#ifdef HAVE_STRUCT_UCRED
|
||||
+#ifdef HAVE_STRUCT_SOCKPEERCRED
|
||||
-- get the credentials of our domain socket peer.
|
||||
, getPeerCred
|
||||
#endif
|
||||
--- Network/Socket.hsc.orig Fri Apr 18 09:16:03 2014
|
||||
+++ Network/Socket.hsc Wed Nov 12 22:40:00 2014
|
||||
@@ -327,9 +327,10 @@ socket family stype protocol = do
|
||||
socket_status <- newMVar NotConnected
|
||||
let sock = MkSocket fd family stype protocol socket_status
|
||||
@ -28,31 +17,3 @@ don't throw an error when attempting to setsockopt IPV6_V6ONLY
|
||||
when (family == AF_INET6) $
|
||||
E.catch (setSocketOption sock IPv6Only 0) $ (\(_ :: E.IOException) -> return ())
|
||||
# else
|
||||
@@ -983,22 +984,22 @@ getSocketOption (MkSocket s _ _ _ _) so = do
|
||||
fromIntegral `liftM` peek ptr_v
|
||||
|
||||
|
||||
-#ifdef HAVE_STRUCT_UCRED
|
||||
+#ifdef HAVE_STRUCT_SOCKPEERCRED
|
||||
-- | Returns the processID, userID and groupID of the socket's peer.
|
||||
--
|
||||
-- Only available on platforms that support SO_PEERCRED on domain sockets.
|
||||
getPeerCred :: Socket -> IO (CUInt, CUInt, CUInt)
|
||||
getPeerCred sock = do
|
||||
let fd = fdSocket sock
|
||||
- let sz = (fromIntegral (#const sizeof(struct ucred)))
|
||||
+ let sz = (fromIntegral (#const sizeof(struct sockpeercred)))
|
||||
with sz $ \ ptr_cr ->
|
||||
alloca $ \ ptr_sz -> do
|
||||
poke ptr_sz sz
|
||||
throwSocketErrorIfMinus1Retry "getPeerCred" $
|
||||
c_getsockopt fd (#const SOL_SOCKET) (#const SO_PEERCRED) ptr_cr ptr_sz
|
||||
- pid <- (#peek struct ucred, pid) ptr_cr
|
||||
- uid <- (#peek struct ucred, uid) ptr_cr
|
||||
- gid <- (#peek struct ucred, gid) ptr_cr
|
||||
+ pid <- (#peek struct sockpeercred, pid) ptr_cr
|
||||
+ uid <- (#peek struct sockpeercred, uid) ptr_cr
|
||||
+ gid <- (#peek struct sockpeercred, gid) ptr_cr
|
||||
return (pid, uid, gid)
|
||||
#endif
|
||||
|
||||
|
@ -1,50 +0,0 @@
|
||||
$OpenBSD: patch-configure_ac,v 1.2 2012/12/02 20:27:19 kili Exp $
|
||||
|
||||
ucred is sockpeercred on OpenBSD
|
||||
|
||||
--- configure.ac.orig Thu Aug 16 18:06:46 2012
|
||||
+++ configure.ac Wed Nov 21 21:18:41 2012
|
||||
@@ -70,16 +70,16 @@ AC_EGREP_HEADER(in_addr_t, netinet/in.h,
|
||||
AC_MSG_RESULT(no))
|
||||
|
||||
dnl --------------------------------------------------
|
||||
-dnl * test for SO_PEERCRED and struct ucred
|
||||
+dnl * test for SO_PEERCRED and struct sockpeercred
|
||||
dnl --------------------------------------------------
|
||||
-AC_MSG_CHECKING(for SO_PEERCRED and struct ucred in sys/socket.h)
|
||||
+AC_MSG_CHECKING(for SO_PEERCRED and struct sockpeercred in sys/socket.h)
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#ifndef SO_PEERCRED
|
||||
# error no SO_PEERCRED
|
||||
#endif
|
||||
-struct ucred u;]])],ac_cv_ucred=yes,ac_cv_ucred=no)
|
||||
-if test "x$ac_cv_ucred" = xno; then
|
||||
+struct sockpeercred u;]])],ac_cv_sockpeercred=yes,ac_cv_sockpeercred=no)
|
||||
+if test "x$ac_cv_sockpeercred" = xno; then
|
||||
old_CFLAGS="$CFLAGS"
|
||||
CFLAGS="-D_GNU_SOURCE $CFLAGS"
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
|
||||
@@ -87,18 +87,18 @@ if test "x$ac_cv_ucred" = xno; then
|
||||
#ifndef SO_PEERCRED
|
||||
# error no SO_PEERCRED
|
||||
#endif
|
||||
-struct ucred u;]])],ac_cv_ucred=yes,ac_cv_ucred=no)
|
||||
- if test "x$ac_cv_ucred" = xyes; then
|
||||
+struct sockpeercred u;]])],ac_cv_sockpeercred=yes,ac_cv_sockpeercred=no)
|
||||
+ if test "x$ac_cv_sockpeercred" = xyes; then
|
||||
EXTRA_CPPFLAGS=-D_GNU_SOURCE
|
||||
fi
|
||||
else
|
||||
old_CFLAGS="$CFLAGS"
|
||||
fi
|
||||
-if test "x$ac_cv_ucred" = xno; then
|
||||
+if test "x$ac_cv_sockpeercred" = xno; then
|
||||
CFLAGS="$old_CFLAGS"
|
||||
AC_MSG_RESULT(no)
|
||||
else
|
||||
- AC_DEFINE([HAVE_STRUCT_UCRED], [1], [Define to 1 if you have both SO_PEERCRED and struct ucred.])
|
||||
+ AC_DEFINE([HAVE_STRUCT_SOCKPEERCRED], [1], [Define to 1 if you have both SO_PEERCRED and struct sockpeercred.])
|
||||
AC_MSG_RESULT(yes)
|
||||
fi
|
||||
|
@ -1,39 +0,0 @@
|
||||
$OpenBSD: patch-include_HsNetworkConfig_h_in,v 1.2 2012/12/02 20:27:19 kili Exp $
|
||||
|
||||
ucred is sockpeercred on OpenBSD
|
||||
|
||||
--- include/HsNetworkConfig.h.in.orig Thu Aug 16 18:06:46 2012
|
||||
+++ include/HsNetworkConfig.h.in Wed Nov 21 21:18:41 2012
|
||||
@@ -83,17 +83,17 @@
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H
|
||||
|
||||
-/* Define to 1 if `msg_accrights' is a member of `struct msghdr'. */
|
||||
+/* Define to 1 if `msg_accrights' is member of `struct msghdr'. */
|
||||
#undef HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS
|
||||
|
||||
-/* Define to 1 if `msg_control' is a member of `struct msghdr'. */
|
||||
+/* Define to 1 if `msg_control' is member of `struct msghdr'. */
|
||||
#undef HAVE_STRUCT_MSGHDR_MSG_CONTROL
|
||||
|
||||
-/* Define to 1 if `sa_len' is a member of `struct sockaddr'. */
|
||||
+/* Define to 1 if `sa_len' is member of `struct sockaddr'. */
|
||||
#undef HAVE_STRUCT_SOCKADDR_SA_LEN
|
||||
|
||||
-/* Define to 1 if you have both SO_PEERCRED and struct ucred. */
|
||||
-#undef HAVE_STRUCT_UCRED
|
||||
+/* Define to 1 if you have both SO_PEERCRED and struct sockpeercred. */
|
||||
+#undef HAVE_STRUCT_SOCKPEERCRED
|
||||
|
||||
/* Define to 1 if you have the `symlink' function. */
|
||||
#undef HAVE_SYMLINK
|
||||
@@ -139,9 +139,6 @@
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME
|
||||
-
|
||||
-/* Define to the home page for this package. */
|
||||
-#undef PACKAGE_URL
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
@ -1,8 +1,7 @@
|
||||
@comment $OpenBSD: PLIST,v 1.8 2013/07/18 21:48:49 kili Exp $
|
||||
@comment $OpenBSD: PLIST,v 1.9 2014/11/22 20:48:00 kili Exp $
|
||||
@conflict hs-network-bytestring-*
|
||||
@pkgpath net/hs-network-bytestring
|
||||
lib/ghc/${DISTNAME}/
|
||||
lib/ghc/${DISTNAME}/HS${DISTNAME}.o
|
||||
lib/ghc/${DISTNAME}/Network/
|
||||
lib/ghc/${DISTNAME}/Network.hi
|
||||
lib/ghc/${DISTNAME}/Network.p_hi
|
||||
|
Loading…
Reference in New Issue
Block a user