[sr-dev] git:master:996c1a58: Makefile.defs: add -DHAVE_SCHED_YIELD to OpenBSD options

Mikko Lehto mslehto at iki.fi
Mon Feb 22 23:17:53 CET 2016


Module: kamailio
Branch: master
Commit: 996c1a58353d6c0ac5e30daf5d7e8e854bd45419
URL: https://github.com/kamailio/kamailio/commit/996c1a58353d6c0ac5e30daf5d7e8e854bd45419

Author: Mikko Lehto <mslehto at iki.fi>
Committer: Mikko Lehto <mslehto at iki.fi>
Date: 2016-02-22T23:45:32+02:00

Makefile.defs: add -DHAVE_SCHED_YIELD to OpenBSD options

According to manual, sched_yield(2) was introduced in OpenBSD 4.2

---

Modified: Makefile.defs

---

Diff:  https://github.com/kamailio/kamailio/commit/996c1a58353d6c0ac5e30daf5d7e8e854bd45419.diff
Patch: https://github.com/kamailio/kamailio/commit/996c1a58353d6c0ac5e30daf5d7e8e854bd45419.patch

---

diff --git a/Makefile.defs b/Makefile.defs
index 226b68a..5400195 100644
--- a/Makefile.defs
+++ b/Makefile.defs
@@ -1844,7 +1844,8 @@ ifeq ($(OS), openbsd)
 	C_DEFS+=-DHAVE_SOCKADDR_SA_LEN  -DHAVE_GETHOSTBYNAME2 \
 		-DHAVE_UNION_SEMUN -DHAVE_MSGHDR_MSG_CONTROL \
 		-DHAVE_CONNECT_ECONNRESET_BUG -DHAVE_TIMEGM \
-		-DHAVE_NETINET_IN_SYSTM -DUSE_SIGWAIT
+		-DHAVE_NETINET_IN_SYSTM -DUSE_SIGWAIT \
+		-DHAVE_SCHED_YIELD
 	ifneq ($(found_lock_method), yes)
 		C_DEFS+= -DUSE_PTHREAD_MUTEX  # try pthread sems
 		found_lock_method=yes
@@ -1860,7 +1861,6 @@ ifeq ($(OS), openbsd)
 	endif
 	# (symbols on openbsd are prefixed by "_")
 	YACC=yacc
-	# no sched_yield on openbsd unless linking with c_r (not recommended)
 	# unfortunately pthread is needed for sigwait
 	LIBS= -lpthread
 	OPENBSD_IS_AOUT:= $(shell echo "$(OSREL)" | \




More information about the sr-dev mailing list