Skip to content
Snippets Groups Projects
Commit a5ceef5f authored by Michael Tüxen's avatar Michael Tüxen
Browse files

Improve compilation on Solaris 11.4.

parent 59b59716
No related branches found
No related tags found
No related merge requests found
......@@ -35,7 +35,7 @@
#ifdef USE_LIBPCAP
#if defined(__FreeBSD__) || defined(__APPLE__)
#if defined(__FreeBSD__) || defined(__APPLE__) || defined(__SunOS_5_11)
#include <pcap/pcap.h>
#elif defined(__OpenBSD__) || defined(__NetBSD__)
#include <pcap.h>
......@@ -257,7 +257,7 @@ int packet_socket_receive(struct packet_socket *psock,
(u32)pkt_header->ts.tv_sec,
(u32)pkt_header->ts.tv_usec);
#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__APPLE__)
#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__APPLE__) || defined(__SunOS_5_11)
packet->time_usecs = timeval_to_usecs(&pkt_header->ts);
#elif defined(__OpenBSD__)
packet->time_usecs = bpf_timeval_to_usecs(&pkt_header->ts);
......
......@@ -6934,6 +6934,7 @@ static int await_idle_thread(struct state *state)
return STATUS_OK;
}
#if !defined(__SunOS_5_11)
static int yield(void)
{
#if defined(linux)
......@@ -6948,6 +6949,7 @@ static int yield(void)
return 0;
#endif /* defined(__APPLE__) */
}
#endif
/* Enqueue the system call for the syscall thread and wake up the thread. */
static void enqueue_system_call(
......@@ -6997,8 +6999,12 @@ static void enqueue_system_call(
DEBUGP("main thread: unlocking and yielding\n");
thread_id = state->syscalls->thread_id;
run_unlock(state);
#if defined(__SunOS_5_11)
yield();
#else
if (yield() != 0)
die_perror("yield");
#endif
DEBUGP("main thread: checking syscall thread state\n");
if (is_thread_sleeping(getpid(), thread_id))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment