summaryrefslogtreecommitdiff
path: root/net-mgmt/annextools/files/patch-erpcd::session_dbunx.c
diff options
context:
space:
mode:
authorBruce M Simpson <bms@FreeBSD.org>2003-09-25 19:49:31 +0000
committerBruce M Simpson <bms@FreeBSD.org>2003-09-25 19:49:31 +0000
commit94886678c1e033de12c9ac018e86e46929243712 (patch)
treef7e9eec06f45c11741b9d260056f6d21729d7894 /net-mgmt/annextools/files/patch-erpcd::session_dbunx.c
parent- Update to version 2.1.10 (diff)
Add the Xylogics/Bay Networks/Nortel Networks Annex administration suite.
Allows the Annex to be administered from a FreeBSD host, rather than via the console port. Tested with a MicroAnnex-XL 16 port device. Reviewed by: edwin Approved by: jake (mentor)
Diffstat (limited to 'net-mgmt/annextools/files/patch-erpcd::session_dbunx.c')
-rw-r--r--net-mgmt/annextools/files/patch-erpcd::session_dbunx.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/net-mgmt/annextools/files/patch-erpcd::session_dbunx.c b/net-mgmt/annextools/files/patch-erpcd::session_dbunx.c
new file mode 100644
index 000000000000..03a1b2e26636
--- /dev/null
+++ b/net-mgmt/annextools/files/patch-erpcd::session_dbunx.c
@@ -0,0 +1,26 @@
+--- erpcd/session_dbunx.c.orig Wed Oct 15 13:50:46 1997
++++ erpcd/session_dbunx.c Thu Sep 18 20:10:32 2003
+@@ -117,7 +117,11 @@
+ key_t sem_key = 0; /* semaphore key */
+ int Asemid; /* Access semaphore id */
+
++#if defined(__FreeBSD__)
++int ctlinit;
++#else
+ union semun ctlinit; /* arg struct for semctl */
++#endif
+ /* sembuf elements: index, op, flag */
+ struct sembuf sopwait = {0,-1, SEM_UNDO}; /* wait for semaphore */
+ struct sembuf soppost = {0, 1, SEM_UNDO}; /* set value to available */
+@@ -290,7 +294,11 @@
+ return errno;
+ }
+ }
++#if defined(__FreeBSD__)
++ ctlinit = 1;
++#else
+ ctlinit.val = 1;
++#endif
+ if (semctl(Asemid, 0, SETVAL, ctlinit) == -1) {
+ #ifdef USE_SYSLOG
+ syslog(LOG_CRIT, "%s: Set semaphore, semctl error %d. No database access.", appname, errno);