summaryrefslogtreecommitdiffstats
path: root/libdha
diff options
context:
space:
mode:
authorarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-05-12 02:18:52 +0000
committerarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-05-12 02:18:52 +0000
commit278b3ae129464e1a309240a37667fecdf7e97ac5 (patch)
treeda69625255a4500c44870334fe9f69e691377c19 /libdha
parentfbba89f83b8631f2b5450b0fced0a88e5f9cb64c (diff)
downloadmpv-278b3ae129464e1a309240a37667fecdf7e97ac5.tar.bz2
mpv-278b3ae129464e1a309240a37667fecdf7e97ac5.tar.xz
various openbsd and general warning fixes - patch by Björn Sandell <biorn@dce.chalmers.se>
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@6058 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libdha')
-rw-r--r--libdha/Makefile12
-rw-r--r--libdha/sysdep/pci_openbsd.c2
2 files changed, 12 insertions, 2 deletions
diff --git a/libdha/Makefile b/libdha/Makefile
index 818cf1cac5..aab984fafa 100644
--- a/libdha/Makefile
+++ b/libdha/Makefile
@@ -15,6 +15,10 @@ SRCS=libdha.c mtrr.c pci.c pci_names.c
OBJS=$(SRCS:.c=.o)
CFLAGS = $(OPTFLAGS) -fPIC -I. -I.. -Wall -W
+LIBS =
+ifeq ($(TARGET_OS),OpenBSD)
+LIBS += -li386
+endif
.SUFFIXES: .c .o
@@ -24,7 +28,7 @@ CFLAGS = $(OPTFLAGS) -fPIC -I. -I.. -Wall -W
$(CC) -c $(CFLAGS) -o $@ $<
$(LIBNAME): $(OBJS)
- $(CC) -shared -o $(LIBNAME) $(OBJS)
+ $(CC) -shared -o $(LIBNAME) $(OBJS) $(LIBS)
ln -sf $(LIBNAME) $(SHORTNAME)
all: $(LIBNAME) $(SHORTNAME)
@@ -52,8 +56,12 @@ install:
mkdir -p $(prefix)/lib
install -m 755 -s -p $(LIBNAME) $(prefix)/lib/$(LIBNAME)
rm -f $(prefix)/lib/libdha.so
- ln -sf $(LIBNAME) $(prefix)/lib/libdha.so
+ ln -sf $(LIBNAME) $(prefix)/lib/$(SHORTNAME)
+ifeq ($(TARGET_OS),OpenBSD)
+ ldconfig -R
+else
ldconfig
+endif
#
# include dependency files if they exist
diff --git a/libdha/sysdep/pci_openbsd.c b/libdha/sysdep/pci_openbsd.c
index 387335c236..13504db818 100644
--- a/libdha/sysdep/pci_openbsd.c
+++ b/libdha/sysdep/pci_openbsd.c
@@ -5,6 +5,8 @@
*/
#include <errno.h>
+#include <sys/types.h>
+#include <machine/sysarch.h>
static __inline__ int enable_os_io(void)
{