Merge pull request #2115 from fstd/support_netbsd_2
Support NetBSD and OpenBSD; consolidate BSD build.
This commit is contained in:
commit
8994f1f757
2
Makefile
2
Makefile
@ -7,7 +7,7 @@ vpath %.S $(SRC_PATH)
|
|||||||
vpath %.rc $(SRC_PATH)
|
vpath %.rc $(SRC_PATH)
|
||||||
vpath %.pc.in $(SRC_PATH)
|
vpath %.pc.in $(SRC_PATH)
|
||||||
|
|
||||||
OS=$(shell uname | tr A-Z a-z | tr -d \\-[:digit:].)
|
OS=$(shell uname | tr A-Z a-z | tr -d \\-[:digit:]. | sed -E 's/^(net|open|free)bsd/bsd/')
|
||||||
ARCH=$(shell uname -m)
|
ARCH=$(shell uname -m)
|
||||||
LIBPREFIX=lib
|
LIBPREFIX=lib
|
||||||
LIBSUFFIX=a
|
LIBSUFFIX=a
|
||||||
|
@ -504,7 +504,12 @@ WELS_THREAD_ERROR_CODE WelsQueryLogicalProcessInfo (WelsLogicalProcessInfo* p
|
|||||||
|
|
||||||
size_t len = sizeof (pInfo->ProcessorCount);
|
size_t len = sizeof (pInfo->ProcessorCount);
|
||||||
|
|
||||||
|
#if defined(__OpenBSD__)
|
||||||
|
int scname[] = { CTL_HW, HW_NCPU };
|
||||||
|
if (sysctl (scname, 2, &pInfo->ProcessorCount, &len, NULL, 0) == -1)
|
||||||
|
#else
|
||||||
if (sysctlbyname (HW_NCPU_NAME, &pInfo->ProcessorCount, &len, NULL, 0) == -1)
|
if (sysctlbyname (HW_NCPU_NAME, &pInfo->ProcessorCount, &len, NULL, 0) == -1)
|
||||||
|
#endif
|
||||||
pInfo->ProcessorCount = 1;
|
pInfo->ProcessorCount = 1;
|
||||||
|
|
||||||
return WELS_THREAD_ERROR_OK;
|
return WELS_THREAD_ERROR_OK;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user