pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

libevent on QNX 6.5.0



Hello,

   I need libevent on QNX 6.5.0, and there isn't much one needs to
change to build it.  However, there's are two quirks:

   - I saw some hints that getopt.h may be available in later QNX 7, but
I haven't confirmed it.
   - Commenting out SA_RESTART breaks some rather important semantics.
That said:  Apparently in earlier versions of QNX SA_RESTART was defined
but was silently ignored -- so if one is a snarky mood one could argue
there's prior art..  :/

   There are a few suggestions in various corners of the Internet about
how to create a general purpose work-around for the missing SA_RESTART,
but QNX have stated that it isn't supported _yet_, so I think everyone
is simply waiting for them to implement it.

-- 
Kind Regards,
Jan
QNX 6.5.0 doesn't support SA_RESTART.
This is not a fix, it's just a workaround which breaks signal semantics.

--- signal.c.orig	2017-09-18 00:10:26.660872338 +0200
+++ signal.c	2017-09-18 00:10:42.172654093 +0200
@@ -252,7 +252,9 @@
 #ifdef EVENT__HAVE_SIGACTION
 	memset(&sa, 0, sizeof(sa));
 	sa.sa_handler = handler;
+#ifndef __QNX__
 	sa.sa_flags |= SA_RESTART;
+#endif
 	sigfillset(&sa.sa_mask);
 
 	if (sigaction(evsignal, &sa, sig->sh_old[evsignal]) == -1) {
QNX 6.5.0 doesn't have getopt.h; it has it in unistd.h, hidden behind
the macro __EXT_POSIX2.

--- test/bench_cascade.c.orig	2017-09-18 00:26:37.612694305 +0200
+++ test/bench_cascade.c	2017-09-18 00:27:09.424117803 +0200
@@ -45,10 +45,15 @@
 #include <stdio.h>
 #include <string.h>
 #ifdef EVENT__HAVE_UNISTD_H
+#ifdef __QNX__
+#define __EXT_POSIX2
+#endif
 #include <unistd.h>
 #endif
 #include <errno.h>
+#ifndef __QNX__
 #include <getopt.h>
+#endif
 #include <event.h>
 #include <evutil.h>
 


Home | Main Index | Thread Index | Old Index