summaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authorminskim <minskim@pkgsrc.org>2007-07-08 23:31:34 +0000
committerminskim <minskim@pkgsrc.org>2007-07-08 23:31:34 +0000
commitda38dd349814ca18706953cc89a56189a9229b6f (patch)
treedf0edf952f1490093115554ddb45f882b79e730a /sysutils
parenta526179d8a42c83100eb9b31960ad0fa5aac4adb (diff)
downloadpkgsrc-da38dd349814ca18706953cc89a56189a9229b6f.tar.gz
Use sysctl() when sysctlbyname() is unavailable. Patch from OpenBSD ports.
This fixes PR 36346.
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/fam/distinfo8
-rw-r--r--sysutils/fam/files/IMonKQueue.c++11
-rw-r--r--sysutils/fam/patches/patch-aa6
-rw-r--r--sysutils/fam/patches/patch-ab17
-rw-r--r--sysutils/fam/patches/patch-ax6
5 files changed, 30 insertions, 18 deletions
diff --git a/sysutils/fam/distinfo b/sysutils/fam/distinfo
index f21ff605e83..f54d6b0d2e6 100644
--- a/sysutils/fam/distinfo
+++ b/sysutils/fam/distinfo
@@ -1,10 +1,10 @@
-$NetBSD: distinfo,v 1.26 2007/07/08 22:22:29 minskim Exp $
+$NetBSD: distinfo,v 1.27 2007/07/08 23:31:34 minskim Exp $
SHA1 (fam-2.7.0.tar.gz) = 6c2316f02acf89a41c42ffc3d7fd9cf5eada83a8
RMD160 (fam-2.7.0.tar.gz) = 1895b578d6a141c36d5bee4e3fbbc2a298a91430
Size (fam-2.7.0.tar.gz) = 301974 bytes
-SHA1 (patch-aa) = 9e777dc42b92081b8ca8670277c561f0b6e28d9f
-SHA1 (patch-ab) = 88add19778bbc586e41249a59afb7ba643ff3a5d
+SHA1 (patch-aa) = d9dd9b6faf4ccd89c41404b74fb577ac327fed05
+SHA1 (patch-ab) = dcc2820c754a6670c1c6da0380cac79c6b88f280
SHA1 (patch-ac) = 676966b0372780af4ee5536276132a04dd038863
SHA1 (patch-ad) = 19364c8dd3f887a59f41556206c8c2d179577932
SHA1 (patch-ae) = aa8fed958555d6870367fd202a6117ddcb5a1da9
@@ -26,7 +26,7 @@ SHA1 (patch-at) = 209f89cefac326e6c1b99bec4622ba0d6eabe1e4
SHA1 (patch-au) = 6bd507eb448b3fd126042759a3b6f70335401c5b
SHA1 (patch-av) = e79813d88ec48a886688539da34150c5bd229a0a
SHA1 (patch-aw) = 9e5de9617e6cd59644294695d0ea79427b521ba0
-SHA1 (patch-ax) = bbc6926f9274e3e263343805b1da8ab839e25444
+SHA1 (patch-ax) = c63bf7f2bff7cb9e3bc4c1c6c474a398b01eafcc
SHA1 (patch-ay) = 081b4bc7cf25a8e30b3680b6df7599570ea0db86
SHA1 (patch-az) = 13901fdef8c13318d585e36820c5e0aa4c28f889
SHA1 (patch-ba) = 2f41331994a56eb70364beab70d40ac0bbd1b050
diff --git a/sysutils/fam/files/IMonKQueue.c++ b/sysutils/fam/files/IMonKQueue.c++
index 48c2c27365a..05e3c7f5b78 100644
--- a/sysutils/fam/files/IMonKQueue.c++
+++ b/sysutils/fam/files/IMonKQueue.c++
@@ -1,4 +1,4 @@
-// $NetBSD: IMonKQueue.c++,v 1.3 2005/01/05 16:21:06 jmmv Exp $
+// $NetBSD: IMonKQueue.c++,v 1.4 2007/07/08 23:31:34 minskim Exp $
//
// Copyright (c) 2004, 2005 Julio M. Merino Vidal.
//
@@ -167,7 +167,16 @@ IMon::imon_open(void)
// Get the maximum number of files we can open and use it to set a
// limit of the files we can monitor.
size_t len = sizeof(max_changes);
+#ifdef HAVE_SYSCTLBYNAME
if (sysctlbyname("kern.maxfiles", &max_changes, &len, NULL, 0) == -1)
+#else
+ int mib[2];
+
+ mib[0] = CTL_KERN;
+ mib[1] = KERN_MAXFILES;
+
+ if (sysctl(mib, 2, &max_changes, &len, NULL, 0) == -1)
+#endif
max_changes = 128;
else
max_changes /= 2;
diff --git a/sysutils/fam/patches/patch-aa b/sysutils/fam/patches/patch-aa
index 6d7ece7657b..21128030b10 100644
--- a/sysutils/fam/patches/patch-aa
+++ b/sysutils/fam/patches/patch-aa
@@ -1,6 +1,6 @@
-$NetBSD: patch-aa,v 1.8 2004/12/09 18:45:32 minskim Exp $
+$NetBSD: patch-aa,v 1.9 2007/07/08 23:31:35 minskim Exp $
---- configure.ac.orig 2003-11-26 13:47:59.000000000 -0600
+--- configure.ac.orig 2003-11-26 11:47:59.000000000 -0800
+++ configure.ac
@@ -31,7 +31,7 @@ AC_CHECK_LIB([rpcsvc], [pmap_set])
# Checks for header files.
@@ -24,7 +24,7 @@ $NetBSD: patch-aa,v 1.8 2004/12/09 18:45:32 minskim Exp $
AC_FUNC_ERROR_AT_LINE
AC_FUNC_SELECT_ARGTYPES
-AC_CHECK_FUNCS([bindresvport _daemonize daemon getgrmember select])
-+AC_CHECK_FUNCS([bindresvport _daemonize daemon getgrmember select unsetenv])
++AC_CHECK_FUNCS([bindresvport _daemonize daemon getgrmember select sysctlbyname unsetenv])
AC_CONFIG_FILES([Makefile
src/Makefile
diff --git a/sysutils/fam/patches/patch-ab b/sysutils/fam/patches/patch-ab
index cff6395cefb..a72c9e4bcb1 100644
--- a/sysutils/fam/patches/patch-ab
+++ b/sysutils/fam/patches/patch-ab
@@ -1,8 +1,8 @@
-$NetBSD: patch-ab,v 1.6 2005/03/14 22:40:09 tv Exp $
+$NetBSD: patch-ab,v 1.7 2007/07/08 23:31:35 minskim Exp $
---- config.h.in.orig 2003-01-19 18:40:15.000000000 -0600
+--- config.h.in.orig 2003-01-19 16:40:15.000000000 -0800
+++ config.h.in
-@@ -49,9 +49,15 @@
+@@ -49,9 +49,18 @@
/* Define to 1 if you have the <rpc/rpc.h> header file. */
#undef HAVE_RPC_RPC_H
@@ -12,13 +12,16 @@ $NetBSD: patch-ab,v 1.6 2005/03/14 22:40:09 tv Exp $
/* Define to 1 if you have the `select' function. */
#undef HAVE_SELECT
++/* Define to 1 if you have the `sysctlbyname' function. */
++#undef HAVE_SYSCTLBYNAME
++
+/* Define to 1 if you have the `unsetenv' function. */
+#undef HAVE_UNSETENV
+
/* Define to 1 if the system has the type `socklen_t'. */
#undef HAVE_SOCKLEN_T
-@@ -76,6 +82,9 @@
+@@ -76,6 +85,9 @@
/* Define to 1 if `sa_len' is member of `struct sockaddr'. */
#undef HAVE_STRUCT_SOCKADDR_SA_LEN
@@ -28,7 +31,7 @@ $NetBSD: patch-ab,v 1.6 2005/03/14 22:40:09 tv Exp $
/* Define to 1 if you have the <syslog.h> header file. */
#undef HAVE_SYSLOG_H
-@@ -83,6 +92,9 @@
+@@ -83,6 +95,9 @@
*/
#undef HAVE_SYS_DIR_H
@@ -38,7 +41,7 @@ $NetBSD: patch-ab,v 1.6 2005/03/14 22:40:09 tv Exp $
/* Define to 1 if you have the <sys/imon.h> header file. */
#undef HAVE_SYS_IMON_H
-@@ -120,6 +132,15 @@
+@@ -120,6 +135,15 @@
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
@@ -54,7 +57,7 @@ $NetBSD: patch-ab,v 1.6 2005/03/14 22:40:09 tv Exp $
/* Define to 1 if the system has the type `_Bool'. */
#undef HAVE__BOOL
-@@ -180,3 +201,9 @@
+@@ -180,3 +204,9 @@
/* Define to `int' if <sys/types.h> doesn't define. */
#undef uid_t
diff --git a/sysutils/fam/patches/patch-ax b/sysutils/fam/patches/patch-ax
index 78414cf9f3d..65852641aff 100644
--- a/sysutils/fam/patches/patch-ax
+++ b/sysutils/fam/patches/patch-ax
@@ -1,6 +1,6 @@
-$NetBSD: patch-ax,v 1.11 2005/03/01 23:06:55 dmcmahill Exp $
+$NetBSD: patch-ax,v 1.12 2007/07/08 23:31:35 minskim Exp $
---- configure.orig 2003-11-26 13:47:26.000000000 -0600
+--- configure.orig 2003-11-26 11:47:26.000000000 -0800
+++ configure
@@ -1,6 +1,6 @@
#! /bin/sh
@@ -160,7 +160,7 @@ $NetBSD: patch-ax,v 1.11 2005/03/01 23:06:55 dmcmahill Exp $
-for ac_func in bindresvport _daemonize daemon getgrmember select
-+for ac_func in bindresvport _daemonize daemon getgrmember select unsetenv
++for ac_func in bindresvport _daemonize daemon getgrmember select sysctlbyname unsetenv
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:$LINENO: checking for $ac_func" >&5