summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdio/findfp.c
diff options
context:
space:
mode:
authorespie <espie@openbsd.org>2005-08-02 08:59:47 +0000
committerespie <espie@openbsd.org>2005-08-02 08:59:47 +0000
commit31d84cbf0981f8be92f8f75a6140feb779bf862f (patch)
treea39e534e9a6154515cc8f9acc633a89364ad9c1f /lib/libc/stdio/findfp.c
parent.Dd cleanup; ok jmc@ (diff)
downloadwireguard-openbsd-31d84cbf0981f8be92f8f75a6140feb779bf862f.tar.xz
wireguard-openbsd-31d84cbf0981f8be92f8f75a6140feb779bf862f.zip
zap getdtablesize() external ref (removes a bit of compat from instbin).
okay millert@
Diffstat (limited to 'lib/libc/stdio/findfp.c')
-rw-r--r--lib/libc/stdio/findfp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libc/stdio/findfp.c b/lib/libc/stdio/findfp.c
index 442a5959e12..b6770c0c94c 100644
--- a/lib/libc/stdio/findfp.c
+++ b/lib/libc/stdio/findfp.c
@@ -31,7 +31,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: findfp.c,v 1.7 2005/06/17 20:40:32 espie Exp $";
+static char rcsid[] = "$OpenBSD: findfp.c,v 1.8 2005/08/02 08:59:47 espie Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
@@ -131,6 +131,8 @@ found:
return (fp);
}
+#define getdtablesize() sysconf(_SC_OPEN_MAX)
+
/*
* XXX. Force immediate allocation of internal memory. Not used by stdio,
* but documented historically for certain applications. Bad applications.