aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/services
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2014-06-29 22:26:02 +0000
committerFelix Fietkau <nbd@openwrt.org>2014-06-29 22:26:02 +0000
commit458660960114148856d3a78d635a0acf33eecbc5 (patch)
treed85db87e4b1117dc2516b5241794af36991cad0d /package/network/services
parent25ac0f7db411ba8914a7ff8c65756fbc803aa7f2 (diff)
downloadmaster-187ad058-458660960114148856d3a78d635a0acf33eecbc5.tar.gz
master-187ad058-458660960114148856d3a78d635a0acf33eecbc5.tar.bz2
master-187ad058-458660960114148856d3a78d635a0acf33eecbc5.zip
samba36: fix build error with musl
Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@41402 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/network/services')
-rw-r--r--package/network/services/samba36/patches/111-owrt_smbpasswd.patch18
1 files changed, 11 insertions, 7 deletions
diff --git a/package/network/services/samba36/patches/111-owrt_smbpasswd.patch b/package/network/services/samba36/patches/111-owrt_smbpasswd.patch
index eb2936535d..651daad448 100644
--- a/package/network/services/samba36/patches/111-owrt_smbpasswd.patch
+++ b/package/network/services/samba36/patches/111-owrt_smbpasswd.patch
@@ -1,6 +1,6 @@
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
-@@ -1019,7 +1019,7 @@ TEST_LP_LOAD_OBJ = param/test_lp_load.o
+@@ -1019,7 +1019,7 @@ TEST_LP_LOAD_OBJ = param/test_lp_load.o
PASSWD_UTIL_OBJ = utils/passwd_util.o
@@ -29,7 +29,7 @@
MULTICALL_O = $(sort $(SMBD_MULTI_O) $(NMBD_MULTI_O) $(SMBPASSWD_MULTI_O) $(MULTI_O))
--- /dev/null
+++ b/source3/utils/owrt_smbpasswd.c
-@@ -0,0 +1,245 @@
+@@ -0,0 +1,249 @@
+/*
+ * Copyright (C) 2012 Felix Fietkau <nbd@openwrt.org>
+ * Copyright (C) 2008 John Crispin <blogic@openwrt.org>
@@ -157,20 +157,24 @@
+ int len = strlen(buf);
+
+ fgetpos(fp, &r_pos);
-+ w_pos = r_pos;
-+ w_pos.__pos -= len;
++ fseek(fp, -len, SEEK_CUR);
++ fgetpos(fp, &w_pos);
++ fsetpos(fp, &r_pos);
+
+ while (fgets(buf, sizeof(buf) - 1, fp)) {
+ int cur_len = strlen(buf);
+
+ fsetpos(fp, &w_pos);
+ fputs(buf, fp);
-+ r_pos.__pos += cur_len;
-+ w_pos.__pos += cur_len;
++ fgetpos(fp, &w_pos);
++
+ fsetpos(fp, &r_pos);
++ fseek(fp, cur_len, SEEK_CUR);
++ fgetpos(fp, &r_pos);
+ }
+
-+ ftruncate(fileno(fp), w_pos.__pos);
++ fsetpos(fp, &w_pos);
++ ftruncate(fileno(fp), ftello(fp));
+}
+
+static int usage(const char *progname)