#include "defs.h"
-#if defined(HAVE_SYS_STREAM_H) || defined(linux)
+#if defined(HAVE_SYS_STREAM_H) || defined(linux) || defined(FREEBSD)
#if defined(linux)
#ifdef HAVE_SYS_POLL_H
#else /* linux */
+#ifndef FREEBSD
#include <stropts.h>
#include <poll.h>
#include <sys/conf.h>
#include <sys/stream.h>
#include <sys/tihdr.h>
+#else /* FREEBSD */
+#include <poll.h>
+#endif /* FREEBSD */
#endif /* linux */
#include <sys/timod.h>
#endif /* HAVE_SYS_TIUSER_H */
+#ifndef FREEBSD
static struct xlat msgflags[] = {
{ RS_HIPRI, "RS_HIPRI" },
{ 0, NULL },
#ifdef HAVE_PUTPMSG
static struct xlat pmsgflags[] = {
+#ifdef MSG_HIPRI
{ MSG_HIPRI, "MSG_HIPRI" },
+#endif
+#ifdef MSG_AND
{ MSG_ANY, "MSG_ANY" },
+#endif
+#ifdef MSG_BAND
{ MSG_BAND, "MSG_BAND" },
+#endif
{ 0, NULL },
};
}
#endif /* HAVE_PUTPMSG */
+#endif /* !FREEBSD */
+#ifdef HAVE_SYS_POLL_H
+
static struct xlat pollflags[] = {
#ifdef POLLIN
{ POLLIN, "POLLIN" },
{
struct pollfd *pollp;
-#ifdef HAVE_SYS_POLL_H
if (exiting(tcp)) {
int i;
int nfds = tcp->u_arg[1];
tprintf("%ld", tcp->u_arg[2]);
free(pollp);
}
-#endif
return 0;
}
-#ifndef linux
+#else /* !HAVE_SYS_POLL_H */
+int
+sys_poll(tcp)
+struct tcb *tcp;
+{
+ return 0;
+}
+#endif
+
+#if !defined(linux) && !defined(FREEBSD)
static struct xlat stream_flush_options[] = {
{ FLUSHR, "FLUSHR" },
}
}
-#endif /* linux */
+#endif /* !linux && !FREEBSD */
-#endif /* LINUXSPARC && linux */
+#endif /* HAVE_SYS_STREAM_H || linux || FREEBSD */