File:  [DVB] / dietlibc / lib / __sysctl.c
Revision 1.1: download - view: text, annotated - select for diffs
Tue Aug 19 15:28:11 2003 UTC (20 years, 9 months ago) by leitner
Branches: MAIN
CVS tags: HEAD
fix sysctl (Thomas)

/* includes linux/sysctl.h, and we don't want to rely in Linux kernel
 * headers for building the diet libc: */
/* #include <sys/sysctl.h> */
#include <unistd.h>

struct __sysctl_args {
	int *name;
	int nlen;
	void *oldval;
	size_t *oldlenp;
	void *newval;
	size_t newlen;
	unsigned long __unused[4];
};

extern int sysctl (int *, int, void *, size_t *, void *, size_t);

int
sysctl (int *name, int nlen, void *oldval, size_t *oldlenp, void *newval, size_t newlen)
{
	struct __sysctl_args args;
	args.name = name;
	args.nlen = nlen;
	args.oldval = oldval;
	args.oldlenp = oldlenp;
	args.newval = newval;
	args.newlen = newlen;
	return (_sysctl (&args));
}

LinuxTV legacy CVS <linuxtv.org/cvs>