Skip to content

Commit cf129b7

Browse files
committed
fix smb2.h:37:9: error: unknown type name 'time_t';
1 parent 8d67be0 commit cf129b7

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

patches/ffmpeg-n6.1/0020-add-built-in-smb2-protocol-via-libsmb2.patch

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
From eddc99cb17ff667656a38cda644eb239910574a5 Mon Sep 17 00:00:00 2001
1+
From d39c2bfe3f729b3d2e654597c6f97a8ad032f0f1 Mon Sep 17 00:00:00 2001
22
From: qianlongxu <qianlongxu@gmail.com>
3-
Date: Mon, 4 Nov 2024 15:27:00 +0800
3+
Date: Tue, 31 Dec 2024 09:31:32 +0800
44
Subject: [PATCH 20] add built-in smb2 protocol via libsmb2
55

66
---
@@ -12,7 +12,7 @@ Subject: [PATCH 20] add built-in smb2 protocol via libsmb2
1212
create mode 100644 libavformat/libsmb2.c
1313

1414
diff --git a/configure b/configure
15-
index 3f2fd2d..16d0177 100755
15+
index e8cfbb7..c8d0d27 100755
1616
--- a/configure
1717
+++ b/configure
1818
@@ -266,6 +266,7 @@ External library support:
@@ -31,15 +31,15 @@ index 3f2fd2d..16d0177 100755
3131
libsnappy
3232
libsoxr
3333
libspeex
34-
@@ -3676,6 +3678,7 @@ librtmps_protocol_deps="librtmp"
34+
@@ -3679,6 +3681,7 @@ librtmps_protocol_deps="librtmp"
3535
librtmpt_protocol_deps="librtmp"
3636
librtmpte_protocol_deps="librtmp"
3737
libsmbclient_protocol_deps="libsmbclient gplv3"
3838
+libsmb2_protocol_deps="libsmb2"
3939
libsrt_protocol_deps="libsrt"
4040
libsrt_protocol_select="network"
4141
libssh_protocol_deps="libssh"
42-
@@ -6798,6 +6801,8 @@ enabled libshaderc && require_pkg_config spirv_compiler "shaderc >= 2019.
42+
@@ -6808,6 +6811,8 @@ enabled libshaderc && require_pkg_config spirv_compiler "shaderc >= 2019.
4343
enabled libshine && require_pkg_config libshine shine shine/layer3.h shine_encode_buffer
4444
enabled libsmbclient && { check_pkg_config libsmbclient smbclient libsmbclient.h smbc_init ||
4545
require libsmbclient libsmbclient.h smbc_init -lsmbclient; }
@@ -62,7 +62,7 @@ index ae952eb..427c45a 100644
6262
OBJS-$(CONFIG_LIBZMQ_PROTOCOL) += libzmq.o
6363
diff --git a/libavformat/libsmb2.c b/libavformat/libsmb2.c
6464
new file mode 100644
65-
index 0000000..5fa1ba4
65+
index 0000000..2514b2a
6666
--- /dev/null
6767
+++ b/libavformat/libsmb2.c
6868
@@ -0,0 +1,412 @@
@@ -95,7 +95,8 @@ index 0000000..5fa1ba4
9595
+#include "application.h"
9696
+#include "url.h"
9797
+#include "urldecode.h"
98-
+
98+
+//smb2.h:37:9: error: unknown type name 'time_t';
99+
+#include <time.h>
99100
+#include <smb2/smb2.h>
100101
+#include <smb2/libsmb2.h>
101102
+#include <smb2/libsmb2-raw.h>
@@ -387,7 +388,6 @@ index 0000000..5fa1ba4
387388
+ LIBSMB2Context *libsmb2 = h->priv_data;
388389
+ AVIODirEntry *entry;
389390
+ struct smb2dirent *dirent = NULL;
390-
+ char *url = NULL;
391391
+ int skip_entry;
392392
+
393393
+ *next = entry = ff_alloc_dir_entry();
@@ -478,7 +478,6 @@ index 0000000..5fa1ba4
478478
+ .priv_data_class = &libsmb2lient_context_class,
479479
+ .flags = URL_PROTOCOL_FLAG_NETWORK,
480480
+};
481-
\ No newline at end of file
482481
diff --git a/libavformat/protocols.c b/libavformat/protocols.c
483482
index 73df344..2bda874 100644
484483
--- a/libavformat/protocols.c

0 commit comments

Comments
 (0)