# HG changeset patch # User Markus Mützel # Date 1591905590 -7200 # Node ID 53c3c929c037afc24c7a3fe435ba70f253457ee5 # Parent 8999910050bee1587138dd51ea02975b8c1bec79 libbiosig: Don't include in files that use "sopen" from libbiosig. * src/libbiosig-1-fixes.patch: Avoid including , or "sopen" will be declared twice with conflicting type. * dist-files.mk: Include new file in list. diff -r 8999910050be -r 53c3c929c037 dist-files.mk --- a/dist-files.mk Thu Jun 11 08:16:05 2020 -0400 +++ b/dist-files.mk Thu Jun 11 21:59:50 2020 +0200 @@ -217,6 +217,7 @@ libarchive.mk \ libass-test.c \ libass.mk \ + libbiosig-1-fixes.patch \ libbiosig.mk \ libcdio.mk \ libcroco.mk \ diff -r 8999910050be -r 53c3c929c037 src/libbiosig-1-fixes.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/libbiosig-1-fixes.patch Thu Jun 11 21:59:50 2020 +0200 @@ -0,0 +1,96 @@ +diff --git "a/biosig.c" "b/biosig.c" +index 5872cef..ed7b64a 100644 +--- "a/biosig.c" ++++ "b/biosig.c" +@@ -53,7 +53,26 @@ + #include + #include // define macro isnan() + #include ++#ifdef _WIN32 ++// Can't include sys/stat.h or sopen is declared twice. ++#include ++struct stat { ++ _dev_t st_dev; ++ _ino_t st_ino; ++ unsigned short st_mode; ++ short st_nlink; ++ short st_uid; ++ short st_gid; ++ _dev_t st_rdev; ++ _off_t st_size; ++ time_t st_atime; ++ time_t st_mtime; ++ time_t st_ctime; ++}; ++int __cdecl stat(const char *_Filename,struct stat *_Stat); ++#else + #include ++#endif + + + #ifdef WITH_CURL + +diff --git "a/t210/sopen_heka_read.c" "b/t210/sopen_heka_read.c" +index d256a15..6025211 100644 +--- "a/t210/sopen_heka_read.c" ++++ "b/t210/sopen_heka_read.c" +@@ -24,7 +24,26 @@ + #include + #include + #include ++#ifdef _WIN32 ++// Can't include sys/stat.h or sopen is declared twice. ++#include ++struct stat { ++ _dev_t st_dev; ++ _ino_t st_ino; ++ unsigned short st_mode; ++ short st_nlink; ++ short st_uid; ++ short st_gid; ++ _dev_t st_rdev; ++ _off_t st_size; ++ time_t st_atime; ++ time_t st_mtime; ++ time_t st_ctime; ++}; ++int __cdecl stat(const char *_Filename,struct stat *_Stat); ++#else + #include ++#endif + + #include "../biosig.h" + + +diff --git "a/test0/sandbox.c" "b/test0/sandbox.c" +index eed47b7..309c009 100644 +--- "a/test0/sandbox.c" ++++ "b/test0/sandbox.c" +@@ -26,7 +26,26 @@ + #include + #include + #include ++#ifdef _WIN32 ++// Can't include sys/stat.h or sopen is declared twice. ++#include ++struct stat { ++ _dev_t st_dev; ++ _ino_t st_ino; ++ unsigned short st_mode; ++ short st_nlink; ++ short st_uid; ++ short st_gid; ++ _dev_t st_rdev; ++ _off_t st_size; ++ time_t st_atime; ++ time_t st_mtime; ++ time_t st_ctime; ++}; ++int __cdecl stat(const char *_Filename,struct stat *_Stat); ++#else + #include ++#endif + + #include "../biosig.h" + +