summaryrefslogtreecommitdiff
path: root/packfile.h
diff options
context:
space:
mode:
authorBeat Bolli <dev+git@drbeat.li>2018-07-25 21:56:07 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-07-26 17:36:26 (GMT)
commitb42f98af096bfdf90339def75fe969b9d969b0f6 (patch)
tree93c9bcae0c184a0c652ff6c921538c2faf9469b2 /packfile.h
parentb7bd9486b055c3f967a870311e704e3bb0654e4f (diff)
downloadgit-b42f98af096bfdf90339def75fe969b9d969b0f6.zip
git-b42f98af096bfdf90339def75fe969b9d969b0f6.tar.gz
git-b42f98af096bfdf90339def75fe969b9d969b0f6.tar.bz2
packfile: ensure that enum object_type is defined
When compiling under Apple LLVM version 9.1.0 (clang-902.0.39.2) with "make DEVELOPER=1 DEVOPTS=pedantic", the compiler says error: redeclaration of already-defined enum 'object_type' is a GNU extension [-Werror,-Wgnu-redeclared-enum] According to https://en.cppreference.com/w/c/language/declarations (section "Redeclaration"), a repeated declaration after the definition is only legal for structs and unions, but not for enums. Drop the belated declaration of enum object_type and include cache.h instead to make sure the enum is defined. Helped-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Beat Bolli <dev+git@drbeat.li> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'packfile.h')
-rw-r--r--packfile.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/packfile.h b/packfile.h
index cc7eaff..fa36c47 100644
--- a/packfile.h
+++ b/packfile.h
@@ -1,12 +1,12 @@
#ifndef PACKFILE_H
#define PACKFILE_H
+#include "cache.h"
#include "oidset.h"
/* in object-store.h */
struct packed_git;
struct object_info;
-enum object_type;
/*
* Generate the filename to be used for a pack file with checksum "sha1" and