Search for /lib/libc.so.6 on 32 bit platforms (Rajeesh K Nambiar).
authorRichard Jones <rjones@redhat.com>
Mon, 9 Mar 2009 16:13:04 +0000 (16:13 +0000)
committerRichard Jones <rjones@redhat.com>
Mon, 9 Mar 2009 16:13:04 +0000 (16:13 +0000)
auto-buildrequires-preload.c

index 7b9bdc1..a1e6773 100644 (file)
@@ -1,6 +1,7 @@
 /* Automatic generation of BuildRequires dependencies for rpmbuild.
  * Copyright (C) 2008 Red Hat Inc.
  * Written by Richard W.M. Jones <rjones@redhat.com>
+ * Patches from Rajeesh K Nambiar <rajeeshknambiar@gmail.com>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -191,6 +192,8 @@ br_init (void)
   void *dl;
 
   dl = dlopen ("/lib64/libc.so.6", RTLD_LAZY|RTLD_LOCAL);
+  if (dl == NULL)      // Try '/lib/' also
+         dl = dlopen("/lib/libc.so.6", RTLD_LAZY|RTLD_LOCAL);
   if (dl == NULL) {
     fprintf (stderr, "%s\n", dlerror ());
     abort ();