$OpenBSD: patch-src_callbacks_c,v 1.2 2008/08/25 15:15:53 jasper Exp $
--- src/callbacks.c.orig	Thu Aug 21 16:19:13 2008
+++ src/callbacks.c	Thu Aug 21 16:19:38 2008
@@ -30,7 +30,9 @@ $Id: callbacks.c,v 1.65 2004/01/21 15:57:32 ericprev E
 #include <sys/socket.h>
 #include <sys/un.h>
 #include <math.h>
-#include <linux/sem.h>
+#ifdef HAVE_LINUX_SEM_H
+# include <linux/sem.h>     /* for the value of SEMVMX */
+#endif
 #include <fcntl.h>
 #include <signal.h>
 #include <dirent.h>
@@ -74,6 +76,10 @@ $Id: callbacks.c,v 1.65 2004/01/21 15:57:32 ericprev E
 #include "notes_buffer.h"
 #include "global_user.h"
 #include "manage_chat.h"
+
+#ifdef __OpenBSD__
+# define SEMVMX 32767
+#endif
 
 static void build_start_dl_popup(int from_panel);
 void on_load_selected_share_lists_button_clicked (GtkButton       *button, gpointer         user_data);
