Magellan Linux

Contents of /trunk/busybox/patches/busybox-1.19.0-freebsd.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1519 - (show annotations) (download)
Mon Sep 5 21:52:12 2011 UTC (12 years, 7 months ago) by niro
File size: 2544 byte(s)
-added upstream patches
1 --- busybox-1.19.0/include/platform.h
2 +++ busybox-1.19.0-freebsd/include/platform.h
3 @@ -417,6 +417,8 @@ typedef unsigned smalluint;
4 # undef HAVE_STRVERSCMP
5 # undef HAVE_XTABS
6 # undef HAVE_DPRINTF
7 +# undef HAVE_UNLOCKED_STDIO
8 +# undef HAVE_UNLOCKED_LINE_OPS
9 #endif
10
11 #if defined(__FreeBSD__)
12 --- busybox-1.19.0/libbb/getpty.c
13 +++ busybox-1.19.0-freebsd/libbb/getpty.c
14 @@ -19,20 +19,22 @@ int FAST_FUNC xgetpty(char *line)
15 if (p > 0) {
16 grantpt(p); /* chmod+chown corresponding slave pty */
17 unlockpt(p); /* (what does this do?) */
18 -#ifndef HAVE_PTSNAME_R
19 - const char *name;
20 - name = ptsname(p); /* find out the name of slave pty */
21 - if (!name) {
22 - bb_perror_msg_and_die("ptsname error (is /dev/pts mounted?)");
23 +# ifndef HAVE_PTSNAME_R
24 + {
25 + const char *name;
26 + name = ptsname(p); /* find out the name of slave pty */
27 + if (!name) {
28 + bb_perror_msg_and_die("ptsname error (is /dev/pts mounted?)");
29 + }
30 + safe_strncpy(line, name, GETPTY_BUFSIZE);
31 }
32 - safe_strncpy(line, name, GETPTY_BUFSIZE);
33 -#else
34 +# else
35 /* find out the name of slave pty */
36 if (ptsname_r(p, line, GETPTY_BUFSIZE-1) != 0) {
37 bb_perror_msg_and_die("ptsname error (is /dev/pts mounted?)");
38 }
39 line[GETPTY_BUFSIZE-1] = '\0';
40 -#endif
41 +# endif
42 return p;
43 }
44 #else
45 --- busybox-1.19.0/libbb/match_fstype.c
46 +++ busybox-1.19.0-freebsd/libbb/match_fstype.c
47 @@ -10,6 +10,8 @@
48 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
49 */
50
51 +#ifdef HAVE_MNTENT_H
52 +
53 #include "libbb.h"
54
55 int FAST_FUNC match_fstype(const struct mntent *mt, const char *t_fstype)
56 @@ -40,3 +42,5 @@ int FAST_FUNC match_fstype(const struct
57
58 return !match;
59 }
60 +
61 +#endif /* HAVE_MNTENT_H */
62 --- busybox-1.19.0/libbb/udp_io.c
63 +++ busybox-1.19.0-freebsd/libbb/udp_io.c
64 @@ -13,7 +13,7 @@
65 * We don't check for errors here. Not supported == won't be used
66 */
67 void FAST_FUNC
68 -socket_want_pktinfo(int fd)
69 +socket_want_pktinfo(int fd UNUSED_PARAM)
70 {
71 #ifdef IP_PKTINFO
72 setsockopt(fd, IPPROTO_IP, IP_PKTINFO, &const_int_1, sizeof(int));
73 --- busybox-1.19.0/miscutils/less.c
74 +++ busybox-1.19.0-freebsd/miscutils/less.c
75 @@ -721,8 +721,8 @@ static void print_found(const char *line
76 while (match_status == 0) {
77 char *new = xasprintf("%s%.*s"HIGHLIGHT"%.*s"NORMAL,
78 growline ? growline : "",
79 - match_structs.rm_so, str,
80 - match_structs.rm_eo - match_structs.rm_so,
81 + (int)match_structs.rm_so, str,
82 + (int)(match_structs.rm_eo - match_structs.rm_so),
83 str + match_structs.rm_so);
84 free(growline);
85 growline = new;