[libdvdcss-devel] dvd_region: #include ioctl.c instead of linking against the object file

[email protected] (Diego Biurrun)
Newsgroups gmane.comp.video.videolan.libdvdcss,gmane.comp.video.videolan.libdvdcss.devel
Message-ID <[email protected]>
libdvdcss | branch: master | Diego Biurrun <[email protected]> | Fri Oct 24 19:01:59 2014 +0200| [c80285708770e7d7bd1367cad3256e2644f84ac0] | committer: Diego Biurrun

dvd_region: #include ioctl.c instead of linking against the object file

On non-Linux platform dvd_region uses static functions from ioctl.c,
so just linking against the object file is not enough.

> http://git.videolan.org/gitweb.cgi/libdvdcss.git/?a=commit;h=c80285708770e7d7bd1367cad3256e2644f84ac0
---

 Makefile.am       |    2 +-
 test/dvd_region.c |    3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/Makefile.am b/Makefile.am
index 9a471d3..583a1f2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -39,7 +39,7 @@ test_csstest_SOURCES = test/csstest.c
 test_csstest_LDADD = libdvdcss.la
 test_csstest_CFLAGS = -I $(top_srcdir)/src
 
-test_dvd_region_SOURCES = test/dvd_region.c src/ioctl.c
+test_dvd_region_SOURCES = test/dvd_region.c
 test_dvd_region_LDADD = libdvdcss.la
 test_dvd_region_CFLAGS = -I $(top_srcdir)/src
 
diff --git a/test/dvd_region.c b/test/dvd_region.c
index d5e80fd..ff8d796 100644
--- a/test/dvd_region.c
+++ b/test/dvd_region.c
@@ -22,6 +22,9 @@
 #include "common.h"
 #include "ioctl.h"
 
+/* On non-Linux platforms static functions from ioctl.c are used. */
+#include "ioctl.c"
+
 #define DEFAULT_DEVICE "/dev/dvd"
 
 /*****************************************************************************

_______________________________________________
libdvdcss-devel mailing list
[email protected]
https://mailman.videolan.org/listinfo/libdvdcss-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.