Skip to content

Commit

Permalink
Fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
dg0yt committed Sep 11, 2024
1 parent cecd0c3 commit 52afd89
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 28 deletions.
11 changes: 0 additions & 11 deletions ports/libdvdread/inttypes.diff

This file was deleted.

36 changes: 36 additions & 0 deletions ports/libdvdread/msvc.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
diff --git a/msvc/include/inttypes.h b/msvc/include/inttypes.h
index 4e1cbe1..5b7f18f 100644
--- a/msvc/include/inttypes.h
+++ b/msvc/include/inttypes.h
@@ -28,5 +28,6 @@
#define _SYS_INTTYPES_H_

#include <config.h>
+#include <stdint.h>

#endif
diff --git a/src/dvd_reader.c b/src/dvd_reader.c
index c4d9641..b3b0158 100644
--- a/src/dvd_reader.c
+++ b/src/dvd_reader.c
@@ -60,6 +60,7 @@

#if defined(_WIN32)
# include <windows.h>
+# include <winsock2.h>
# include "msvc/contrib/win32_cs.h"
#endif

diff --git a/src/dvdread/dvd_reader.h b/src/dvdread/dvd_reader.h
index 5681e0e..d1495c2 100644
--- a/src/dvdread/dvd_reader.h
+++ b/src/dvdread/dvd_reader.h
@@ -25,6 +25,8 @@

#ifdef _MSC_VER
#include <config.h>
+#include <windows.h>
+typedef SSIZE_T ssize_t;

#include <stdio.h>
#include <stdlib.h>
5 changes: 2 additions & 3 deletions ports/libdvdread/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ vcpkg_from_gitlab(
SHA512 9eb6d551489ab1d214c56461eebafd6ecba7de8dcc60aecb7e22f82c019fd3d045fc09af66507c2e14bc53e099aec8e87620dfd988fe047a7bfa5e5d1d2c46bd
HEAD_REF master
PATCHES
inttypes.diff
ssize_t.diff
msvc.diff
)
file(TOUCH "${SOURCE_PATH}/msvc/include/strings.h")
file(WRITE "${SOURCE_PATH}/ChangeLog" "Cf. https://code.videolan.org/videolan/libdvdread/-/commits/${VERSION}/") # not in git
Expand All @@ -22,7 +21,7 @@ if(VCPKG_TARGET_IS_WINDOWS)
set(cppflags "CPPFLAGS=\$CPPFLAGS -DPATH_MAX=2048 -DWIN32_LEAN_AND_MEAN")
if(NOT VCPKG_TARGET_IS_MINGW)
cmake_path(RELATIVE_PATH SOURCE_PATH BASE_DIRECTORY "${CURRENT_BUILDTREES_DIR}" OUTPUT_VARIABLE sources)
string(APPEND cppflags " -I../${sources}/msvc/include")
string(APPEND cppflags " -I../${sources}/msvc/include -D_CRT_SECURE_NO_WARNINGS")
endif()
endif()

Expand Down
13 changes: 0 additions & 13 deletions ports/libdvdread/ssize_t.diff

This file was deleted.

2 changes: 1 addition & 1 deletion versions/l-/libdvdread.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"versions": [
{
"git-tree": "c0cb7feec9f2c2034a963723d45a2d6a1f415f74",
"git-tree": "e8d6657807fd4a0e5a252fc963ae8787b7483b0e",
"version-semver": "6.1.3",
"port-version": 0
}
Expand Down

0 comments on commit 52afd89

Please sign in to comment.