summaryrefslogtreecommitdiffstats
path: root/sys-apps/util-linux/files/util-linux-2.13-uclibc.patch
blob: 237e126e0dbde6fbb35417b85d5b0e7058fc5692 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
--- login-utils/agetty.c
+++ login-utils/agetty.c
@@ -884,7 +884,7 @@
 
 		  case 'o':
 		   {
-		     char domainname[HOST_NAME_MAX+1];
+		     char domainname[HOSTNAME_LENGTH+1];
 #ifdef HAVE_GETDOMAINNAME
 		     if (getdomainname(domainname, sizeof(domainname)))
 #endif
@@ -897,7 +897,7 @@
 		  case 'O':
 		   {
 			char *dom = "unknown_domain";
-			char host[HOST_NAME_MAX + 1];
+			char host[HOSTNAME_LENGTH + 1];
 			struct addrinfo hints, *info = NULL;
 
 			memset(&hints, 0, sizeof(hints));
@@ -992,7 +992,7 @@
     }
 #endif
     {
-	char hn[HOST_NAME_MAX+1];
+	char hn[HOSTNAME_LENGTH+1];
 	if (gethostname(hn, sizeof(hn)) == 0)
 	    write(1, hn, strlen(hn));
     }
--- configure
+++ configure
@@ -7663,7 +7663,10 @@
 main ()
 {
 
-int test = SYS_sched_getaffinity;
+#if defined(__UCLIBC__) && __UCLIBC_SUBLEVEL__ <= 28
+#error taskset unusable
+#endif
+int test = SYS_sched_getaffinity;
 
   ;
   return 0;
--- sys-utils/setarch.c
+++ sys-utils/setarch.c
@@ -39,6 +39,10 @@
 #include <sys/utsname.h>
 #include "nls.h"
 
+#if defined(__UCLIBC__) && __UCLIBC_SUBLEVEL__ <= 28
+static const char *program_invocation_short_name;
+#endif
+
 #define set_pers(pers) ((long)syscall(SYS_personality, pers))
 
 struct {
@@ -184,6 +188,14 @@
   bindtextdomain(PACKAGE, LOCALEDIR);
   textdomain(PACKAGE);
 
+#if defined(__UCLIBC__) && __UCLIBC_SUBLEVEL__ <= 28
+  program_invocation_short_name = strrchr(argv[0],'/');
+  if (program_invocation_short_name)
+    program_invocation_short_name++;
+  else
+    program_invocation_short_name = argv[0];
+#endif
+
   if (argc < 1)
     show_usage(_("Not enough arguments"));