summaryrefslogtreecommitdiff
path: root/sysutils/mmc-utils/files/patch-mmc.h
diff options
context:
space:
mode:
authorMarius Strobl <marius@FreeBSD.org>2017-03-16 22:36:04 +0000
committerMarius Strobl <marius@FreeBSD.org>2017-03-16 22:36:04 +0000
commit1c2892dd9173c1cd0b1cc81ee054a678feb1f386 (patch)
tree10fcc1119018cc3771a42a9a4e37600b3f8c9251 /sysutils/mmc-utils/files/patch-mmc.h
parentChange RUN_DEPENDS from rubygem-slack-notifier to rubygem-slack-notifier1 (diff)
Add a port of mmc-utils, a collection of tools for MMC/SD devices.
Among others, this allows to partition eMMC devices via /dev/mmcsdN. Currently, FreeBSD version 1200025 or later is required for mmc-utils. CAVEAT EMPTOR: Partitioning eMMC devices is a one-time operation.
Diffstat (limited to 'sysutils/mmc-utils/files/patch-mmc.h')
-rw-r--r--sysutils/mmc-utils/files/patch-mmc.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/sysutils/mmc-utils/files/patch-mmc.h b/sysutils/mmc-utils/files/patch-mmc.h
new file mode 100644
index 000000000000..1017e7cc82c0
--- /dev/null
+++ b/sysutils/mmc-utils/files/patch-mmc.h
@@ -0,0 +1,25 @@
+--- mmc.h.orig 2017-01-25 19:03:34 UTC
++++ mmc.h
+@@ -17,8 +17,22 @@
+ * those modifications are Copyright (c) 2016 SanDisk Corp.
+ */
+
++#if defined(__linux__)
+ #include <asm-generic/int-ll64.h>
+ #include <linux/mmc/ioctl.h>
++#elif defined(__FreeBSD__)
++#include <dev/mmc/mmc_ioctl.h>
++#include <sys/endian.h>
++#include <sys/types.h>
++typedef int8_t __s8;
++typedef uint8_t __u8;
++typedef int16_t __s16;
++typedef uint16_t __u16;
++typedef int32_t __s32;
++typedef uint32_t __u32;
++typedef int64_t __s64;
++typedef uint64_t __u64;
++#endif
+ #include <stdio.h>
+
+ #define CHECK(expr, msg, err_stmt) { if (expr) { fprintf(stderr, msg); err_stmt; } }