|
|
# --- SDE-COPYRIGHT-NOTE-BEGIN --- # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # # Filename: package/.../sfdisk/sfdisk.010.index-rindex-fix.patch # Copyright (C) 2011 The OpenSDE Project # # More information can be found in the files COPYING and README. # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or (at your option) any later # version. # --- SDE-COPYRIGHT-NOTE-END ---
Imported from buildroot http://git.uclibc.org/buildroot/tree/package/sfdisk
--- 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
|