View | Details | Raw Unified | Return to bug 256351
Collapse All | Expand All

(-)b/sysutils/toybox/Makefile (-1 / +1 lines)
Lines 1-5 Link Here
1
PORTNAME=	toybox
1
PORTNAME=	toybox
2
PORTVERSION=	0.8.4
2
PORTVERSION=	0.8.5
3
CATEGORIES=	sysutils
3
CATEGORIES=	sysutils
4
4
5
MAINTAINER=	vidar@karlsen.tech
5
MAINTAINER=	vidar@karlsen.tech
(-)b/sysutils/toybox/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1606836525
1
TIMESTAMP = 1621778141
2
SHA256 (landley-toybox-0.8.4_GH0.tar.gz) = bea9fe3aae662ef97b7450df8c0333e50c69cd9f626be8f7e245ef322605b1e9
2
SHA256 (landley-toybox-0.8.5_GH0.tar.gz) = 27cc073222f3b726ee10d96c4f32ac2c4c936b07ea195227736755971e6d90c9
3
SIZE (landley-toybox-0.8.4_GH0.tar.gz) = 1141779
3
SIZE (landley-toybox-0.8.5_GH0.tar.gz) = 2387752
(-)b/sysutils/toybox/files/patch-lib_portability.c (-14 / +15 lines)
Lines 1-4 Link Here
1
--- lib/portability.c.orig	2020-05-11 18:23:26 UTC
1
--- lib/portability.c.orig	2021-05-19 08:34:26 UTC
2
+++ lib/portability.c
2
+++ lib/portability.c
3
@@ -6,6 +6,10 @@
3
@@ -6,6 +6,10 @@
4
 
4
 
Lines 11-47 Link Here
11
 // We can't fork() on nommu systems, and vfork() requires an exec() or exit()
11
 // We can't fork() on nommu systems, and vfork() requires an exec() or exit()
12
 // before resuming the parent (because they share a heap until then). And no,
12
 // before resuming the parent (because they share a heap until then). And no,
13
 // we can't implement our own clone() call that does the equivalent of fork()
13
 // we can't implement our own clone() call that does the equivalent of fork()
14
@@ -522,6 +526,8 @@ int dev_minor(int dev)
14
@@ -536,6 +540,8 @@ int dev_minor(int dev)
15
   return ((dev&0xfff00000)>>12)|(dev&0xff);
16
 #elif defined(__APPLE__)
17
   return dev&0xffffff;
15
   return dev&0xffffff;
16
 #elif defined(__OpenBSD__)
17
   return minor(dev);
18
+#elif defined(__FreeBSD__)
18
+#elif defined(__FreeBSD__)
19
+  return minor(dev);
19
+  return minor(dev);
20
 #else
20
 #else
21
 #error
21
 #error
22
 #endif
22
 #endif
23
@@ -533,6 +539,8 @@ int dev_major(int dev)
23
@@ -549,6 +555,8 @@ int dev_major(int dev)
24
   return (dev&0xfff00)>>8;
25
 #elif defined(__APPLE__)
26
   return (dev>>24)&0xff;
24
   return (dev>>24)&0xff;
25
 #elif defined(__OpenBSD__)
26
   return major(dev);
27
+#elif defined(__FreeBSD__)
27
+#elif defined(__FreeBSD__)
28
+  return major(dev);
28
+  return major(dev);
29
 #else
29
 #else
30
 #error
30
 #error
31
 #endif
31
 #endif
32
@@ -544,6 +552,8 @@ int dev_makedev(int major, int minor)
32
@@ -562,6 +570,8 @@ int dev_makedev(int major, int minor)
33
   return (minor&0xff)|((major&0xfff)<<8)|((minor&0xfff00)<<12);
34
 #elif defined(__APPLE__)
35
   return (minor&0xffffff)|((major&0xff)<<24);
33
   return (minor&0xffffff)|((major&0xff)<<24);
34
 #elif defined(__OpenBSD__)
35
   return makedev(major, minor);
36
+#elif defined(__FreeBSD__)
36
+#elif defined(__FreeBSD__)
37
+  return makedev(major, minor);
37
+  return makedev(major, minor);
38
 #else
38
 #else
39
 #error
39
 #error
40
 #endif
40
 #endif
41
@@ -593,5 +603,16 @@ int get_block_device_size(int fd, unsigned long long* 
41
@@ -621,6 +631,17 @@ int get_block_device_size(int fd, unsigned long long* 
42
 int get_block_device_size(int fd, unsigned long long* size)
42
   int status = (ioctl(fd, DIOCGDINFO, &lab) >= 0);
43
 {
43
   *size = lab.d_secsize * lab.d_nsectors;
44
   return (ioctl(fd, BLKGETSIZE64, size) >= 0);
44
   return status;
45
+}
45
+}
46
+#elif defined(__FreeBSD__)
46
+#elif defined(__FreeBSD__)
47
+#include <sys/disk.h>
47
+#include <sys/disk.h>
Lines 55-57 Link Here
55
+  return 0;
55
+  return 0;
56
 }
56
 }
57
 #endif
57
 #endif
58
 
(-)b/sysutils/toybox/files/patch-lib_portability.h (+11 lines)
Added Link Here
1
--- lib/portability.h.orig	2021-06-01 14:59:57 UTC
2
+++ lib/portability.h
3
@@ -217,7 +217,7 @@ int posix_fallocate(int, off_t, off_t);
4
 #include <xlocale.h>
5
 #endif
6
 
7
-#if defined(__APPLE__) || defined(__OpenBSD__)
8
+#if defined(__APPLE__) || defined(__OpenBSD__) || defined(__FreeBSD__)
9
 static inline long statfs_bsize(struct statfs *sf) { return sf->f_iosize; }
10
 static inline long statfs_frsize(struct statfs *sf) { return sf->f_bsize; }
11
 #else

Return to bug 256351