Bug 1014613 - Unbreak build on BSDs after bug 908503.

This commit is contained in:
Jan Beich 2014-05-23 14:07:29 +12:00
parent 3787e97238
commit a4ad3e8ea8
2 changed files with 21 additions and 0 deletions

View File

@ -21,6 +21,12 @@ elif CONFIG['OS_TARGET'] == 'Darwin':
DEFINES['HAVE_SYS_UIO_H'] = True DEFINES['HAVE_SYS_UIO_H'] = True
DEFINES['off64_t'] = 'off_t' DEFINES['off64_t'] = 'off_t'
LOCAL_INCLUDES += [ 'ports/darwin/include' ] LOCAL_INCLUDES += [ 'ports/darwin/include' ]
elif CONFIG['OS_TARGET'] in ('DragonFly', 'FreeBSD', 'OpenBSD', 'NetBSD'):
if not CONFIG['OS_TARGET'] == 'NetBSD':
DEFINES['ENODATA'] = '-0x80000003'
DEFINES['HAVE_SYS_UIO_H'] = True
DEFINES['off64_t'] = 'off_t'
LOCAL_INCLUDES += [ 'ports/bsd/include' ]
else: else:
DEFINES['HAVE_SYS_UIO_H'] = True DEFINES['HAVE_SYS_UIO_H'] = True
if CONFIG['OS_TARGET'] == 'Linux': if CONFIG['OS_TARGET'] == 'Linux':

View File

@ -0,0 +1,15 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
#ifndef BYTESWAP_H_
#define BYTESWAP_H_
#include <sys/endian.h>
#ifdef __OpenBSD__
#define bswap_16(x) swap16(x)
#else
#define bswap_16(x) bswap16(x)
#endif
#endif