]> git.sesse.net Git - vlc/commitdiff
Fixed compilation problems with OpenBSD.
authorChristophe Massiot <massiot@videolan.org>
Mon, 22 Oct 2001 12:28:53 +0000 (12:28 +0000)
committerChristophe Massiot <massiot@videolan.org>
Mon, 22 Oct 2001 12:28:53 +0000 (12:28 +0000)
include/common.h
include/netutils.h
src/misc/modules_core.h

index 2710d0c015c5038b0a4be18aee9c74fa709e4828..ccae63e682c96c4e15e6672e99cc4e7878e5491b 100644 (file)
@@ -3,7 +3,7 @@
  * Collection of useful common types and macros definitions
  *****************************************************************************
  * Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: common.h,v 1.41 2001/09/28 09:57:08 massiot Exp $
+ * $Id: common.h,v 1.42 2001/10/22 12:28:53 massiot Exp $
  *
  * Authors: Samuel Hocevar <sam@via.ecp.fr>
  *          Vincent Seguin <seguin@via.ecp.fr>
@@ -206,6 +206,7 @@ struct pgrm_descriptor_s;
 #else
 #   ifdef HAVE_VALLOC
         /* That's like using a hammer to kill a fly, but eh... */
+#       include <unistd.h>
 #       define memalign(align,size) valloc(size)
 #   else
         /* Assume malloc alignment is sufficient */
index 3e04dadfacd7ca733979144f28d24a74887e57ff..24e9626d7622d740d65daa6d032e75f30ecc0125 100644 (file)
@@ -4,7 +4,7 @@
  * modules.
  *****************************************************************************
  * Copyright (C) 1999, 2000, 2001 VideoLAN
- * $Id: netutils.h,v 1.14 2001/05/30 17:03:11 sam Exp $
+ * $Id: netutils.h,v 1.15 2001/10/22 12:28:53 massiot Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Henri Fallon <henri@videolan.org>
@@ -30,6 +30,7 @@
 /*****************************************************************************
  * Prototypes
  *****************************************************************************/
+struct sockaddr_in;
 int network_BuildLocalAddr ( struct sockaddr_in *, int, char * ); 
 int network_BuildRemoteAddr( struct sockaddr_in *, char * );
 int network_ChannelJoin    ( int );
index 1c239747f4b33e3a6fa33491c5673706efaa6c4d..1dbcf0ef7ff9a46454ab383400ccab2974d912b2 100644 (file)
@@ -2,7 +2,7 @@
  * modules_core.h : Module management functions used by the core application.
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: modules_core.h,v 1.3 2001/06/25 11:34:08 sam Exp $
+ * $Id: modules_core.h,v 1.4 2001/10/22 12:28:53 massiot Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -42,12 +42,16 @@ module_load( char * psz_filename, module_handle_t * handle )
     *handle = LoadLibrary( psz_filename );
     return( *handle == NULL ); 
 
-#else
+#elif defined(RTLD_NOW)
     /* Do not open modules with RTLD_GLOBAL, or we are going to get namespace
      * collisions when two modules have common public symbols */
     *handle = dlopen( psz_filename, RTLD_NOW );
     return( *handle == NULL );
 
+#else
+    *handle = dlopen( psz_filename, DL_LAZY );
+    return( *handle == NULL );
+
 #endif
 }