Ported to OpenBSD
This commit is contained in:
@@ -1075,7 +1075,7 @@ void *scheduler(void)
|
||||
* Check the systems load average.
|
||||
*/
|
||||
Load = loadavg[0] = loadavg[1] = loadavg[2] = 0.0;
|
||||
#if defined(__FreeBSD__) || defined(__NetBSD__)
|
||||
#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
|
||||
if (getloadavg(loadavg, 3) == 3) {
|
||||
Load = loadavg[0];
|
||||
}
|
||||
|
@@ -62,7 +62,7 @@ int ping_receive(struct in_addr);
|
||||
/*
|
||||
* different names, same thing... be careful, as these are macros...
|
||||
*/
|
||||
#if defined(__FreeBSD__) || defined(__NetBSD__)
|
||||
#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
|
||||
# define icmphdr icmp
|
||||
# define iphdr ip
|
||||
# define ip_saddr ip_src.s_addr
|
||||
@@ -89,7 +89,7 @@ int ping_receive(struct in_addr);
|
||||
# define icmp_seq un.echo.sequence
|
||||
#endif
|
||||
|
||||
#if defined(__FreeBSD__) || defined(__NetBSD__)
|
||||
#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
|
||||
# define ICMP_DEST_UNREACH ICMP_UNREACH
|
||||
# define ICMP_TIME_EXCEEDED ICMP_TIMXCEED
|
||||
#endif
|
||||
|
@@ -36,7 +36,7 @@
|
||||
|
||||
|
||||
#ifndef LOCKDIR
|
||||
#if defined(__FreeBSD__) || defined(__NetBSD__)
|
||||
#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
|
||||
#define LOCKDIR "/var/spool/lock"
|
||||
#else
|
||||
#define LOCKDIR "/var/lock"
|
||||
|
@@ -358,7 +358,7 @@ void update_diskstat(void)
|
||||
* See man 2 statvfs about what approximately is defined.
|
||||
*/
|
||||
tmp->ro = (strstr(tmp->fstype, "iso") != NULL);
|
||||
#elif defined(__FreeBSD__) || defined(__NetBSD__)
|
||||
#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
|
||||
/*
|
||||
* XxxxBSD has the info in the statfs structure.
|
||||
*/
|
||||
@@ -381,7 +381,7 @@ void add_path(char *lpath)
|
||||
#if defined(__linux__)
|
||||
char *mtab, *fs;
|
||||
FILE *fp;
|
||||
#elif defined(__FreeBSD__) || defined(__NetBSD__)
|
||||
#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
|
||||
struct statfs *mntbuf;
|
||||
long mntsize;
|
||||
int i;
|
||||
@@ -432,7 +432,7 @@ void add_path(char *lpath)
|
||||
fill_mfslist(&mfs, fsname, fstype);
|
||||
}
|
||||
|
||||
#elif defined(__FreeBSD__) || defined(__NetBSD__)
|
||||
#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
|
||||
|
||||
if ((mntsize = getmntinfo(&mntbuf, MNT_NOWAIT))) {
|
||||
|
||||
@@ -446,7 +446,7 @@ void add_path(char *lpath)
|
||||
}
|
||||
|
||||
#else
|
||||
#error "Unknow OS - don't know what to do"
|
||||
#error "Unknown OS - don't know what to do"
|
||||
#endif
|
||||
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user