summaryrefslogtreecommitdiffstats
path: root/package/sfdisk/sfdisk.010.index-rindex-fix.patch
diff options
context:
space:
mode:
authorNigel Kukard <nkukard@lbsd.net>2008-04-17 13:23:20 +0000
committerNigel Kukard <nkukard@lbsd.net>2008-04-17 13:23:20 +0000
commit6bdcf9c361fea713ae0c24d1b09142093721a5b0 (patch)
tree39093ed1fd50f90c1a2d25fb18f3a3cd49bb5471 /package/sfdisk/sfdisk.010.index-rindex-fix.patch
parent51114afc64b3e13e7a393f9d34a607ccf699a4d0 (diff)
downloadbuildroot-novena-6bdcf9c361fea713ae0c24d1b09142093721a5b0.tar.gz
buildroot-novena-6bdcf9c361fea713ae0c24d1b09142093721a5b0.zip
* Fix _llseek not being defined in some cases
* Add index & rindex defines if they're not defined either (legacy susv4 functions)
Diffstat (limited to 'package/sfdisk/sfdisk.010.index-rindex-fix.patch')
-rw-r--r--package/sfdisk/sfdisk.010.index-rindex-fix.patch21
1 files changed, 21 insertions, 0 deletions
diff --git a/package/sfdisk/sfdisk.010.index-rindex-fix.patch b/package/sfdisk/sfdisk.010.index-rindex-fix.patch
new file mode 100644
index 000000000..0eb15af09
--- /dev/null
+++ b/package/sfdisk/sfdisk.010.index-rindex-fix.patch
@@ -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