Add dosfstools port.
This commit is contained in:
parent
870fb38bf2
commit
bc48ded292
|
@ -0,0 +1,43 @@
|
||||||
|
diff -Paur --no-dereference -- dosfstools.upstream/src/blkdev/blkdev.c dosfstools/src/blkdev/blkdev.c
|
||||||
|
--- dosfstools.upstream/src/blkdev/blkdev.c
|
||||||
|
+++ dosfstools/src/blkdev/blkdev.c
|
||||||
|
@@ -7,7 +7,6 @@
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <sys/ioctl.h>
|
||||||
|
-#include <sys/sysmacros.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
diff -Paur --no-dereference -- dosfstools.upstream/src/common.c dosfstools/src/common.c
|
||||||
|
--- dosfstools.upstream/src/common.c
|
||||||
|
+++ dosfstools/src/common.c
|
||||||
|
@@ -297,16 +297,7 @@
|
||||||
|
|
||||||
|
uint32_t generate_volume_id(void)
|
||||||
|
{
|
||||||
|
- struct timeval now;
|
||||||
|
-
|
||||||
|
- if (gettimeofday(&now, NULL) != 0 || now.tv_sec == (time_t)-1 || now.tv_sec < 0) {
|
||||||
|
- srand(getpid());
|
||||||
|
- /* rand() returns int from [0,RAND_MAX], therefore only 31 bits */
|
||||||
|
- return (((uint32_t)(rand() & 0xFFFF)) << 16) | ((uint32_t)(rand() & 0xFFFF));
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- /* volume ID = current time, fudged for more uniqueness */
|
||||||
|
- return ((uint32_t)now.tv_sec << 20) | (uint32_t)now.tv_usec;
|
||||||
|
+ return arc4random();
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
diff -Paur --no-dereference -- dosfstools.upstream/src/device_info.c dosfstools/src/device_info.c
|
||||||
|
--- dosfstools.upstream/src/device_info.c
|
||||||
|
+++ dosfstools/src/device_info.c
|
||||||
|
@@ -24,7 +24,6 @@
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <sys/ioctl.h>
|
||||||
|
-#include <sys/sysmacros.h>
|
||||||
|
|
||||||
|
#ifdef HAVE_LINUX_LOOP_H
|
||||||
|
#include <linux/loop.h>
|
|
@ -0,0 +1,12 @@
|
||||||
|
NAME=dosfstools
|
||||||
|
BUILD_LIBRARIES=libiconv?
|
||||||
|
VERSION=4.2
|
||||||
|
DISTNAME=$NAME-$VERSION
|
||||||
|
COMPRESSION=tar.gz
|
||||||
|
ARCHIVE=$DISTNAME.$COMPRESSION
|
||||||
|
SHA256SUM=64926eebf90092dca21b14259a5301b7b98e7b1943e8a201c7d726084809b527
|
||||||
|
UPSTREAM_SITE=https://github.com/dosfstools/dosfstools/releases/download/v$VERSION
|
||||||
|
UPSTREAM_ARCHIVE=$ARCHIVE
|
||||||
|
LICENSE=GPL-3.0-or-later
|
||||||
|
BUILD_SYSTEM=configure
|
||||||
|
DEVELOPMENT=true
|
Loading…
Reference in New Issue