Fix all warnings and enable -Werror for gptfdisk.

Bug: 26936282
Change-Id: Id7e9ec5e769e1abedc1d2e36bff2c5488b1c4b3e
diff --git a/parttypes.cc b/parttypes.cc
index 175aca5..47c0f72 100644
--- a/parttypes.cc
+++ b/parttypes.cc
@@ -6,7 +6,9 @@
   under the terms of the GNU GPL version 2, as detailed in the COPYING file. */
 
 #define __STDC_LIMIT_MACROS
+#ifndef __STDC_CONSTANT_MACROS
 #define __STDC_CONSTANT_MACROS
+#endif
 
 #include <string.h>
 #include <stdint.h>