summaryrefslogtreecommitdiffstats
path: root/src/partgpt.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2007-11-16 09:07:02 +0100
committerChristophe Grenier <grenier@cgsecurity.org>2007-11-16 09:07:02 +0100
commit89fe7f800604e0919dd02b1f13da5b74459f0daa (patch)
tree24f0cf2f547bff0f4131f45da603db8b56262dbd /src/partgpt.c
parentb7d3c98ee6faa0b75d2f2a559baa656f8546848e (diff)
Add ncurses parameters in configure
Diffstat (limited to 'src/partgpt.c')
-rw-r--r--src/partgpt.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/partgpt.c b/src/partgpt.c
index 36b86de..09d5f77 100644
--- a/src/partgpt.c
+++ b/src/partgpt.c
@@ -329,8 +329,10 @@ static void partition_generate_gpt_entry(struct gpt_ent* gpt_entry, const partit
{
#ifdef HAVE_UUID_GENERATE
uuid_generate((unsigned char*)(&gpt_entry->ent_uuid));
-#else
+#elif defined HAVE_UUIDGEN
uuidgen((struct uuid*)(&gpt_entry->ent_uuid),1);
+#else
+#warn You need a uuid_generate or uuidgen function
#endif
swap_uuid_and_efi_guid((efi_guid_t *)(&gpt_entry->ent_uuid));
}
@@ -467,8 +469,10 @@ static int write_part_gpt(disk_t *disk_car, const list_part_t *list_part, const
gpt->hdr_lba_end=le64((disk_car->disk_size-1 - gpt_entries_size)/disk_car->sector_size - 1);
#ifdef HAVE_UUID_GENERATE
uuid_generate((unsigned char*)(&gpt->hdr_guid));
-#else
+#elif defined HAVE_UUIDGEN
uuidgen((struct uuid*)(&gpt->hdr_guid),1);
+#else
+#warn You need a uuid_generate or uuidgen function
#endif
swap_uuid_and_efi_guid((efi_guid_t *)(&gpt->hdr_guid));
gpt->hdr_crc_table=le32(get_crc32(gpt_entries, gpt_entries_size, 0xFFFFFFFF)^0xFFFFFFFF);