glibc/glibc-rh1315476-1.patch
Florian Weimer 1ca5ccee9c Resolves: #1315476
Make ldconfig and sln the same binary
2016-07-13 19:37:12 +02:00

55 lines
1.2 KiB
Diff

commit a4551b7f6ce08317220a8cd79cd3d02a03648752
Author: Florian Weimer <fweimer@redhat.com>
Date: Wed Jul 13 11:50:04 2016 +0200
sln: Preprocessor cleanups
diff --git a/elf/sln.c b/elf/sln.c
index f52cb9f..fa4ccec 100644
--- a/elf/sln.c
+++ b/elf/sln.c
@@ -16,10 +16,6 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
#include <error.h>
#include <errno.h>
#include <libintl.h>
@@ -37,10 +33,6 @@
#define PACKAGE _libc_intl_domainname
-#if !defined S_ISDIR && defined S_IFDIR
-#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
-#endif
-
static int makesymlink (const char *src, const char *dest);
static int makesymlinks (const char *file);
static void usage (void);
@@ -89,9 +81,6 @@ usage (void)
static int
makesymlinks (const char *file)
{
-#ifndef PATH_MAX
-#define PATH_MAX 4095
-#endif
char *buffer = NULL;
size_t bufferlen = 0;
int ret;
@@ -190,11 +179,7 @@ makesymlink (const char *src, const char *dest)
return -1;
}
-#ifdef S_ISLNK
if (symlink (src, dest) == 0)
-#else
- if (link (src, dest) == 0)
-#endif
{
/* Destination must exist by now. */
if (access (dest, F_OK))