Blame SOURCES/redhat-lsb-trigger.patch

3f3c6f
--- redhat_lsb_trigger.c.triggerfix	2008-04-16 18:50:14.000000000 +0100
3f3c6f
+++ redhat_lsb_trigger.c	2011-09-14 11:50:42.563080000 +0100
3f3c6f
@@ -423,10 +423,76 @@
3f3c6f
 #define is_ia64() 0
3f3c6f
 #endif
3f3c6f
 
3f3c6f
+char *
3f3c6f
+strtok (char *p, const char *delim)
3f3c6f
+{
3f3c6f
+  static char *olds;
3f3c6f
+  const char *d;
3f3c6f
+  char *token;
3f3c6f
+  if (p == NULL)
3f3c6f
+    p = olds;
3f3c6f
+  while (*p)
3f3c6f
+    {
3f3c6f
+      for (d = delim; *d; d++)
3f3c6f
+	if (*p == *d)
3f3c6f
+	  break;
3f3c6f
+      if (!*d)
3f3c6f
+	break;
3f3c6f
+      p++;
3f3c6f
+    }
3f3c6f
+  if (!*p)
3f3c6f
+    {
3f3c6f
+      olds = p;
3f3c6f
+      return NULL;
3f3c6f
+    }
3f3c6f
+  token = p;
3f3c6f
+  while (*p)
3f3c6f
+    {
3f3c6f
+      for (d = delim; *d; d++)
3f3c6f
+	if (*p == *d)
3f3c6f
+	  break;
3f3c6f
+      if (*d)
3f3c6f
+	break;
3f3c6f
+      p++;
3f3c6f
+    }
3f3c6f
+  if (!*p)
3f3c6f
+    olds = p;
3f3c6f
+  else
3f3c6f
+    {
3f3c6f
+      *p = '\0';
3f3c6f
+      olds = p + 1;
3f3c6f
+    }
3f3c6f
+  return token;
3f3c6f
+}
3f3c6f
+
3f3c6f
+size_t
3f3c6f
+strlen (const char *s)
3f3c6f
+{
3f3c6f
+  const char *p;
3f3c6f
+  for (p = s; *p; ++p);
3f3c6f
+  return p - s;
3f3c6f
+}
3f3c6f
+
3f3c6f
+void *
3f3c6f
+mempcpy (void *dst, const void *src, size_t n)
3f3c6f
+{
3f3c6f
+  char *d = dst;
3f3c6f
+  const char *s = src;
3f3c6f
+  while (n--)
3f3c6f
+    *d++ = *s++;
3f3c6f
+  return d;
3f3c6f
+}
3f3c6f
+
3f3c6f
+char *
3f3c6f
+strcpy (char *dst, const char *src)
3f3c6f
+{
3f3c6f
+  char *ret = dst;
3f3c6f
+  while ((*dst++ = *src++) != '\0');
3f3c6f
+  return ret;
3f3c6f
+}
3f3c6f
+
3f3c6f
 int main (int argc, char **argv)
3f3c6f
 {
3f3c6f
-/* redhat_lsb_trigger.c:428: warning: unused variable 'ret' */
3f3c6f
-/*  long ret; */ 
3f3c6f
   INTERNAL_SYSCALL_DECL (err);
3f3c6f
   char lsbsover[] = LSBSOVER;
3f3c6f
   char *LSBVER, *p = lsbsover;
3f3c6f
@@ -450,15 +516,38 @@
3f3c6f
 int __libc_multiple_threads __attribute__((nocommon));
3f3c6f
 int __libc_enable_asynccancel (void) { return 0; }
3f3c6f
 void __libc_disable_asynccancel (int x) { }
3f3c6f
+#ifndef __arm__
3f3c6f
 void __libc_csu_init (void) { }
3f3c6f
 void __libc_csu_fini (void) { }
3f3c6f
+#endif
3f3c6f
 pid_t __fork (void) { return -1; }
3f3c6f
 char thr_buf[65536];
3f3c6f
 
3f3c6f
-#ifndef __powerpc__
3f3c6f
+void
3f3c6f
+__attribute__ ((noreturn))
3f3c6f
+__stack_chk_fail (void)
3f3c6f
+{
3f3c6f
+  INTERNAL_SYSCALL_DECL (err);
3f3c6f
+  while (1)
3f3c6f
+    INTERNAL_SYSCALL (exit, err, 1, 1);
3f3c6f
+}
3f3c6f
+
3f3c6f
+#if defined __powerpc__
3f3c6f
+
3f3c6f
+struct startup_info
3f3c6f
+{
3f3c6f
+  void *sda_base;
3f3c6f
+  int (*main) (int, char **, char **, void *);
3f3c6f
+  int (*init) (int, char **, char **, void *);
3f3c6f
+  void (*fini) (void);
3f3c6f
+};
3f3c6f
+
3f3c6f
+int __libc_start_main (int argc, char **argv, char **ev,
3f3c6f
+		       void *auxvec, void (*rtld_fini) (void),
3f3c6f
+		       struct startup_info *stinfo,
3f3c6f
+		       char **stack_on_entry)
3f3c6f
+#elif defined __arm__
3f3c6f
 
3f3c6f
-/* /usr/lib/gcc/ppc64-redhat-linux/4.1.2/../../../../lib64/libc.a(libc-start.o): In function `__libc_start_main':
3f3c6f
- *  * (.opd+0x10): multiple definition of `__libc_start_main'  */
3f3c6f
 int ___libc_start_main (int (*main) (int argc, char **argv),
3f3c6f
                        int argc, char **argv,
3f3c6f
 		       void (*init) (void), void (*fini) (void),
3f3c6f
@@ -472,9 +561,7 @@
3f3c6f
   void (*fini) (void);
3f3c6f
 };
3f3c6f
 
3f3c6f
-/* /usr/lib/gcc/ppc64-redhat-linux/4.1.2/../../../../lib64/libc.a(libc-start.o): In function `__libc_start_main':
3f3c6f
- * (.opd+0x10): multiple definition of `__libc_start_main'  */
3f3c6f
-int ___libc_start_main (int argc, char **argv, char **ev,
3f3c6f
+int __libc_start_main (int argc, char **argv, char **ev,
3f3c6f
 		       void *auxvec, void (*rtld_fini) (void),
3f3c6f
 		       struct startup_info *stinfo,
3f3c6f
 		       char **stack_on_entry)