1
/* Including <unistd.h> makes sure that on a glibc system
2
<features.h> is included, which again defines __GLIBC__ */
4
#include "linux_reboot.h"
11
#if defined __GLIBC__ && __GLIBC__ >= 2
12
# include <sys/reboot.h>
13
# define REBOOT(cmd) reboot(cmd)
15
extern int reboot(int, int, int);
16
# define REBOOT(cmd) reboot(LINUX_REBOOT_MAGIC1,LINUX_REBOOT_MAGIC2,(cmd))
23
#else /* no USE_LIBC */
25
/* direct syscall version */
26
#include <linux/unistd.h>
29
_syscall3(int, reboot, int, magic, int, magic_too, int, cmd);
31
/* Let us hope we have a 3-argument reboot here */
32
extern int reboot(int, int, int);
37
return reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, cmd);