Started porting to openbsd, indented some code
This commit is contained in:
parent
3ce863a90a
commit
efa5970da0
2 changed files with 49 additions and 35 deletions
7
Makefile
7
Makefile
|
@ -28,6 +28,13 @@ else ifeq ($(PLATFORM), FreeBSD)
|
|||
LIBDIR = lib
|
||||
ETC_DIR = /etc
|
||||
MANDIR = share/man/man1
|
||||
else ifeq ($(PLATFORM), BSD)
|
||||
CFLAGS += -D__OPENBSD__
|
||||
CFLAGS_DEBUG += -D__OPENBSD__
|
||||
PREFIX = bin
|
||||
LIBDIR = lib
|
||||
ETC_DIR = /etc
|
||||
MANDIR = share/man/man1
|
||||
else ifeq ($(PLATFORM), windows32)
|
||||
CC = gcc
|
||||
PREFIX = "C:\Program Files"
|
||||
|
|
|
@ -30,12 +30,19 @@
|
|||
#include <unistd.h>
|
||||
#if defined(__APPLE__) || defined(__FREEBSD__)
|
||||
#include <sys/sysctl.h>
|
||||
#if defined(__OPENBSD__)
|
||||
#include <sys/time.h>
|
||||
#else
|
||||
#include <time.h>
|
||||
#endif // defined(__OPENBSD__)
|
||||
#else // defined(__APPLE__) || defined(__FREEBSD__)
|
||||
#ifdef __FREEBSD__
|
||||
#else // defined(__FREEBSD__) || defined(_WIN32)
|
||||
#ifndef _WIN32
|
||||
#ifndef __OPENBSD__
|
||||
#include <sys/sysinfo.h>
|
||||
#else // __OPENBSD__
|
||||
#endif // __OPENBSD__
|
||||
#else // _WIN32
|
||||
#include <sysinfoapi.h>
|
||||
#endif // _WIN32
|
||||
|
|
Loading…
Reference in a new issue