* [Buildroot] svn commit: trunk/buildroot/package/sfdisk
@ 2006-11-17 11:54 aldot at uclibc.org
0 siblings, 0 replies; 8+ messages in thread
From: aldot at uclibc.org @ 2006-11-17 11:54 UTC (permalink / raw)
To: buildroot
Author: aldot
Date: 2006-11-17 03:54:45 -0800 (Fri, 17 Nov 2006)
New Revision: 16558
Log:
- I had to apply this patch to get it to build with a uClibc-snapshot..
Added:
trunk/buildroot/package/sfdisk/sfdisk.001.include_sys_syscalls_h.patch
Modified:
trunk/buildroot/package/sfdisk/sfdisk.mk
Changeset:
Added: trunk/buildroot/package/sfdisk/sfdisk.001.include_sys_syscalls_h.patch
===================================================================
--- trunk/buildroot/package/sfdisk/sfdisk.001.include_sys_syscalls_h.patch 2006-11-17 11:52:58 UTC (rev 16557)
+++ trunk/buildroot/package/sfdisk/sfdisk.001.include_sys_syscalls_h.patch 2006-11-17 11:54:45 UTC (rev 16558)
@@ -0,0 +1,12 @@
+--- sfdisk/sfdisk.c.oorig 2006-10-09 16:24:06.000000000 +0200
++++ sfdisk/sfdisk.c 2006-10-09 16:24:20.000000000 +0200
+@@ -47,6 +47,9 @@
+ #include <sys/stat.h>
+ #include <sys/utsname.h>
+ #ifdef __linux__
++#define _LIBC
++#include <sys/syscall.h>
++#undef _LIBC
+ #include <linux/unistd.h> /* _syscall */
+ #endif
+ #include "nls.h"
Modified: trunk/buildroot/package/sfdisk/sfdisk.mk
===================================================================
--- trunk/buildroot/package/sfdisk/sfdisk.mk 2006-11-17 11:52:58 UTC (rev 16557)
+++ trunk/buildroot/package/sfdisk/sfdisk.mk 2006-11-17 11:54:45 UTC (rev 16558)
@@ -10,10 +10,13 @@
$(DL_DIR)/$(SFDISK_SOURCE):
$(WGET) -P $(DL_DIR) $(SFDISK_SITE)/$(SFDISK_SOURCE)
-$(SFDISK_DIR): $(DL_DIR)/$(SFDISK_SOURCE)
+$(SFDISK_DIR)/.patched: $(DL_DIR)/$(SFDISK_SOURCE)
bzcat $(DL_DIR)/$(SFDISK_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
+ toolchain/patch-kernel.sh $(SFDISK_DIR) package/sfdisk/ sfdisk.\*.patch
+ touch $@
+
-$(SFDISK_DIR)/sfdisk: $(SFDISK_DIR)
+$(SFDISK_DIR)/sfdisk: $(SFDISK_DIR)/.patched
$(MAKE) \
CROSS=$(TARGET_CROSS) DEBUG=false OPTIMIZATION="$(TARGET_CFLAGS)" \
-C $(SFDISK_DIR)
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] svn commit: trunk/buildroot/package/sfdisk
@ 2008-04-17 13:23 nkukard at uclibc.org
2008-04-17 13:35 ` sjhill at realitydiluted.com
0 siblings, 1 reply; 8+ messages in thread
From: nkukard at uclibc.org @ 2008-04-17 13:23 UTC (permalink / raw)
To: buildroot
Author: nkukard
Date: 2008-04-17 06:23:20 -0700 (Thu, 17 Apr 2008)
New Revision: 21754
Log:
* Fix _llseek not being defined in some cases
* Add index & rindex defines if they're not defined either (legacy susv4 functions)
Added:
trunk/buildroot/package/sfdisk/sfdisk.005.no-llseek-fix.patch
trunk/buildroot/package/sfdisk/sfdisk.010.index-rindex-fix.patch
Changeset:
Added: trunk/buildroot/package/sfdisk/sfdisk.005.no-llseek-fix.patch
===================================================================
--- trunk/buildroot/package/sfdisk/sfdisk.005.no-llseek-fix.patch (rev 0)
+++ trunk/buildroot/package/sfdisk/sfdisk.005.no-llseek-fix.patch 2008-04-17 13:23:20 UTC (rev 21754)
@@ -0,0 +1,21 @@
+diff -ur sfdisk_vanilla/sfdisk.c sfdisk_llseek-fix/sfdisk.c
+--- sfdisk_vanilla/sfdisk.c 2004-01-13 13:03:11.000000000 +0000
++++ sfdisk_llseek-fix/sfdisk.c 2008-04-17 08:42:35.000000000 +0000
+@@ -134,9 +137,17 @@
+ * Note: we use 512-byte sectors here, irrespective of the hardware ss.
+ */
+ #if defined(__linux__) && !defined (__alpha__) && !defined (__ia64__) && !defined (__x86_64__) && !defined (__s390x__)
++#if defined(_llseek)
+ static
+ _syscall5(int, _llseek, unsigned int, fd, ulong, hi, ulong, lo,
+ loff_t *, res, unsigned int, wh);
++#else
++static int _llseek (unsigned int fd, unsigned long oh,
++ unsigned long ol, long long *result,
++ unsigned int origin) {
++ return syscall (__NR__llseek, fd, oh, ol, result, origin);
++#endif
++}
+ #endif
+
+ static int
Added: trunk/buildroot/package/sfdisk/sfdisk.010.index-rindex-fix.patch
===================================================================
--- trunk/buildroot/package/sfdisk/sfdisk.010.index-rindex-fix.patch (rev 0)
+++ trunk/buildroot/package/sfdisk/sfdisk.010.index-rindex-fix.patch 2008-04-17 13:23:20 UTC (rev 21754)
@@ -0,0 +1,21 @@
+diff -ru sfdisk_llseek-fix/sfdisk.c sfdisk_index-rindex-fix/sfdisk.c
+--- sfdisk_llseek-fix/sfdisk.c 2008-04-17 08:42:35.000000000 +0000
++++ sfdisk_index-rindex-fix/sfdisk.c 2008-04-17 09:50:17.000000000 +0000
+@@ -58,6 +58,17 @@
+
+ #define SIZE(a) (sizeof(a)/sizeof(a[0]))
+
++/*
++ * Why these wouldn't be defined in string.h, I don't know, there is a block
++ * testing for BSD, and no other mention of these functions ... NK
++ */
++#if !defined(index)
++# define index(s,c) strchr((s), (c))
++#endif
++#if !defined(rindex)
++# define rindex(s,c) strrchr((s), (c))
++#endif
++
+ /*
+ * Table of contents:
+ * A. About seeking
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] svn commit: trunk/buildroot/package/sfdisk
2008-04-17 13:23 nkukard at uclibc.org
@ 2008-04-17 13:35 ` sjhill at realitydiluted.com
2008-04-17 13:48 ` Nigel Kukard
2008-04-17 13:56 ` Nigel Kukard
0 siblings, 2 replies; 8+ messages in thread
From: sjhill at realitydiluted.com @ 2008-04-17 13:35 UTC (permalink / raw)
To: buildroot
On Thu, Apr 17, 2008 at 06:23:21AM -0700, nkukard at uclibc.org wrote:
> Author: nkukard
> Date: 2008-04-17 06:23:20 -0700 (Thu, 17 Apr 2008)
> New Revision: 21754
>
> Log:
> * Fix _llseek not being defined in some cases
> * Add index & rindex defines if they're not defined either (legacy susv4 functions)
>
>
> Added:
> trunk/buildroot/package/sfdisk/sfdisk.005.no-llseek-fix.patch
> trunk/buildroot/package/sfdisk/sfdisk.010.index-rindex-fix.patch
>
Please revert the index/rindex patch. You should be patching the code to
NOT use those functions, not define them again. Remove the usage of them
and then submit a patch to the upstream maintainer of sfdisk.
-Steve
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] svn commit: trunk/buildroot/package/sfdisk
@ 2008-04-17 13:40 nkukard at uclibc.org
0 siblings, 0 replies; 8+ messages in thread
From: nkukard at uclibc.org @ 2008-04-17 13:40 UTC (permalink / raw)
To: buildroot
Author: nkukard
Date: 2008-04-17 06:40:46 -0700 (Thu, 17 Apr 2008)
New Revision: 21757
Log:
* Reverted index/rindex fix
Removed:
trunk/buildroot/package/sfdisk/sfdisk.010.index-rindex-fix.patch
Changeset:
Deleted: trunk/buildroot/package/sfdisk/sfdisk.010.index-rindex-fix.patch
===================================================================
--- trunk/buildroot/package/sfdisk/sfdisk.010.index-rindex-fix.patch 2008-04-17 13:28:46 UTC (rev 21756)
+++ trunk/buildroot/package/sfdisk/sfdisk.010.index-rindex-fix.patch 2008-04-17 13:40:46 UTC (rev 21757)
@@ -1,21 +0,0 @@
-diff -ru sfdisk_llseek-fix/sfdisk.c sfdisk_index-rindex-fix/sfdisk.c
---- sfdisk_llseek-fix/sfdisk.c 2008-04-17 08:42:35.000000000 +0000
-+++ sfdisk_index-rindex-fix/sfdisk.c 2008-04-17 09:50:17.000000000 +0000
-@@ -58,6 +58,17 @@
-
- #define SIZE(a) (sizeof(a)/sizeof(a[0]))
-
-+/*
-+ * Why these wouldn't be defined in string.h, I don't know, there is a block
-+ * testing for BSD, and no other mention of these functions ... NK
-+ */
-+#if !defined(index)
-+# define index(s,c) strchr((s), (c))
-+#endif
-+#if !defined(rindex)
-+# define rindex(s,c) strrchr((s), (c))
-+#endif
-+
- /*
- * Table of contents:
- * A. About seeking
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] svn commit: trunk/buildroot/package/sfdisk
@ 2008-04-17 13:47 nkukard at uclibc.org
2008-04-17 14:16 ` sjhill at realitydiluted.com
0 siblings, 1 reply; 8+ messages in thread
From: nkukard at uclibc.org @ 2008-04-17 13:47 UTC (permalink / raw)
To: buildroot
Author: nkukard
Date: 2008-04-17 06:47:29 -0700 (Thu, 17 Apr 2008)
New Revision: 21758
Log:
* Added FIX for rindex/index, will patch util-linux aswell and submit upstream
Added:
trunk/buildroot/package/sfdisk/sfdisk.010.index-rindex-fix-2.patch
Changeset:
Added: trunk/buildroot/package/sfdisk/sfdisk.010.index-rindex-fix-2.patch
===================================================================
--- trunk/buildroot/package/sfdisk/sfdisk.010.index-rindex-fix-2.patch (rev 0)
+++ trunk/buildroot/package/sfdisk/sfdisk.010.index-rindex-fix-2.patch 2008-04-17 13:47:29 UTC (rev 21758)
@@ -0,0 +1,45 @@
+diff -ru sfdisk_vanilla/sfdisk.c sfdisk_index-rindex-fix/sfdisk.c
+--- sfdisk_vanilla/sfdisk.c 2004-01-13 13:03:11.000000000 +0000
++++ sfdisk_index-rindex-fix/sfdisk.c 2008-04-17 13:44:40.000000000 +0000
+@@ -40,7 +40,7 @@
+ #include <unistd.h> /* read, write */
+ #include <fcntl.h> /* O_RDWR */
+ #include <errno.h> /* ERANGE */
+-#include <string.h> /* index() */
++#include <string.h> /* strchr, strrchr */
+ #include <ctype.h>
+ #include <getopt.h>
+ #include <sys/ioctl.h>
+@@ -1672,12 +1672,12 @@
+ eof = 1;
+ return RD_EOF;
+ }
+- if (!(lp = index(lp, '\n')))
++ if (!(lp = strchr(lp, '\n')))
+ fatal(_("long or incomplete input line - quitting\n"));
+ *lp = 0;
+
+ /* remove comments, if any */
+- if ((lp = index(line+2, '#')) != 0)
++ if ((lp = strchr(line+2, '#')) != 0)
+ *lp = 0;
+
+ /* recognize a few commands - to be expanded */
+@@ -1687,7 +1687,7 @@
+ }
+
+ /* dump style? - then bad input is fatal */
+- if ((ip = index(line+2, ':')) != 0) {
++ if ((ip = strchr(line+2, ':')) != 0) {
+ struct dumpfld *d;
+
+ nxtfld:
+@@ -2436,7 +2436,7 @@
+
+ if (argc < 1)
+ fatal(_("no command?\n"));
+- if ((progn = rindex(argv[0], '/')) == NULL)
++ if ((progn = strrchr(argv[0], '/')) == NULL)
+ progn = argv[0];
+ else
+ progn++;
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] svn commit: trunk/buildroot/package/sfdisk
2008-04-17 13:35 ` sjhill at realitydiluted.com
@ 2008-04-17 13:48 ` Nigel Kukard
2008-04-17 13:56 ` Nigel Kukard
1 sibling, 0 replies; 8+ messages in thread
From: Nigel Kukard @ 2008-04-17 13:48 UTC (permalink / raw)
To: buildroot
<snip>
> > trunk/buildroot/package/sfdisk/sfdisk.010.index-rindex-fix.patch
> >
> Please revert the index/rindex patch. You should be patching the code to
> NOT use those functions, not define them again. Remove the usage of them
> and then submit a patch to the upstream maintainer of sfdisk.
done
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://busybox.net/lists/buildroot/attachments/20080417/e18941c0/attachment.pgp
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] svn commit: trunk/buildroot/package/sfdisk
2008-04-17 13:35 ` sjhill at realitydiluted.com
2008-04-17 13:48 ` Nigel Kukard
@ 2008-04-17 13:56 ` Nigel Kukard
1 sibling, 0 replies; 8+ messages in thread
From: Nigel Kukard @ 2008-04-17 13:56 UTC (permalink / raw)
To: buildroot
> > * Add index & rindex defines if they're not defined either (legacy susv4 functions)
> >
> >
> > Added:
> > trunk/buildroot/package/sfdisk/sfdisk.005.no-llseek-fix.patch
> > trunk/buildroot/package/sfdisk/sfdisk.010.index-rindex-fix.patch
> >
> Please revert the index/rindex patch. You should be patching the code to
> NOT use those functions, not define them again. Remove the usage of them
> and then submit a patch to the upstream maintainer of sfdisk.
You probably already submitted your patch
util-linux-remove-deprecated-functions.patch upstream, which I just saw
fixes the same problem. sfdisk appears to be from util-linux, which is
also included under the package dir, which I just added a patch for
which fixes the index/rindex issue and doesnt hide it.
-N
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://busybox.net/lists/buildroot/attachments/20080417/53047c3f/attachment.pgp
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] svn commit: trunk/buildroot/package/sfdisk
2008-04-17 13:47 nkukard at uclibc.org
@ 2008-04-17 14:16 ` sjhill at realitydiluted.com
0 siblings, 0 replies; 8+ messages in thread
From: sjhill at realitydiluted.com @ 2008-04-17 14:16 UTC (permalink / raw)
To: buildroot
On Thu, Apr 17, 2008 at 06:47:29AM -0700, nkukard at uclibc.org wrote:
> Author: nkukard
> Date: 2008-04-17 06:47:29 -0700 (Thu, 17 Apr 2008)
> New Revision: 21758
>
> Log:
> * Added FIX for rindex/index, will patch util-linux aswell and submit upstream
>
Looks good. Thanks for doing that.
-Steve
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2008-04-17 14:16 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-17 11:54 [Buildroot] svn commit: trunk/buildroot/package/sfdisk aldot at uclibc.org
-- strict thread matches above, loose matches on Subject: below --
2008-04-17 13:23 nkukard at uclibc.org
2008-04-17 13:35 ` sjhill at realitydiluted.com
2008-04-17 13:48 ` Nigel Kukard
2008-04-17 13:56 ` Nigel Kukard
2008-04-17 13:40 nkukard at uclibc.org
2008-04-17 13:47 nkukard at uclibc.org
2008-04-17 14:16 ` sjhill at realitydiluted.com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox