From c374630340e8b48a5207d313eb2ed6c0453e31f9 Mon Sep 17 00:00:00 2001 From: marcel Date: Sat, 29 Mar 2014 22:10:54 +0000 Subject: [PATCH] Fix build on FreeBSD 8 where partition types for nandfs do not exist. --- usr.bin/mkimg/apm.c | 4 ++++ usr.bin/mkimg/bsd.c | 4 ++++ usr.bin/mkimg/gpt.c | 5 +++++ usr.bin/mkimg/vtoc8.c | 4 ++++ 4 files changed, 17 insertions(+) diff --git a/usr.bin/mkimg/apm.c b/usr.bin/mkimg/apm.c index 26646f9e4556..f0660d25bef4 100644 --- a/usr.bin/mkimg/apm.c +++ b/usr.bin/mkimg/apm.c @@ -38,6 +38,10 @@ __FBSDID("$FreeBSD$"); #include "mkimg.h" #include "scheme.h" +#ifndef APM_ENT_TYPE_FREEBSD_NANDFS +#define APM_ENT_TYPE_FREEBSD_NANDFS "FreeBSD-nandfs" +#endif + static struct mkimg_alias apm_aliases[] = { { ALIAS_FREEBSD, ALIAS_PTR2TYPE(APM_ENT_TYPE_FREEBSD) }, { ALIAS_FREEBSD_NANDFS, ALIAS_PTR2TYPE(APM_ENT_TYPE_FREEBSD_NANDFS) }, diff --git a/usr.bin/mkimg/bsd.c b/usr.bin/mkimg/bsd.c index 7267a562c5ca..052e6c16de5e 100644 --- a/usr.bin/mkimg/bsd.c +++ b/usr.bin/mkimg/bsd.c @@ -38,6 +38,10 @@ __FBSDID("$FreeBSD$"); #include "mkimg.h" #include "scheme.h" +#ifndef FS_NANDFS +#define FS_NANDFS 30 +#endif + static struct mkimg_alias bsd_aliases[] = { { ALIAS_FREEBSD_NANDFS, ALIAS_INT2TYPE(FS_NANDFS) }, { ALIAS_FREEBSD_SWAP, ALIAS_INT2TYPE(FS_SWAP) }, diff --git a/usr.bin/mkimg/gpt.c b/usr.bin/mkimg/gpt.c index 033b307afdaa..fe6975ee80c9 100644 --- a/usr.bin/mkimg/gpt.c +++ b/usr.bin/mkimg/gpt.c @@ -42,6 +42,11 @@ __FBSDID("$FreeBSD$"); #include "mkimg.h" #include "scheme.h" +#ifndef GPT_ENT_TYPE_FREEBSD_NANDFS +#define GPT_ENT_TYPE_FREEBSD_NANDFS \ + {0x74ba7dd9,0xa689,0x11e1,0xbd,0x04,{0x00,0xe0,0x81,0x28,0x6a,0xcf}} +#endif + static uuid_t gpt_uuid_efi = GPT_ENT_TYPE_EFI; static uuid_t gpt_uuid_freebsd = GPT_ENT_TYPE_FREEBSD; static uuid_t gpt_uuid_freebsd_boot = GPT_ENT_TYPE_FREEBSD_BOOT; diff --git a/usr.bin/mkimg/vtoc8.c b/usr.bin/mkimg/vtoc8.c index 43630241a22a..e5385f6b7d16 100644 --- a/usr.bin/mkimg/vtoc8.c +++ b/usr.bin/mkimg/vtoc8.c @@ -39,6 +39,10 @@ __FBSDID("$FreeBSD$"); #include "mkimg.h" #include "scheme.h" +#ifndef VTOC_TAG_FREEBSD_NANDFS +#define VTOC_TAG_FREEBSD_NANDFS 0x0905 +#endif + static struct mkimg_alias vtoc8_aliases[] = { { ALIAS_FREEBSD_NANDFS, ALIAS_INT2TYPE(VTOC_TAG_FREEBSD_NANDFS) }, { ALIAS_FREEBSD_SWAP, ALIAS_INT2TYPE(VTOC_TAG_FREEBSD_SWAP) },