diff --git a/include/linux/compiler-gcc4.h b/include/linux/compiler-gcc4.h
index 77542c57e20a4d03d7d916c3ffaa1395701d6dc6..e6ef279ca20c4147f4cc8918c7c20ef9964d0ffa 100644
--- a/include/linux/compiler-gcc4.h
+++ b/include/linux/compiler-gcc4.h
@@ -38,7 +38,9 @@
 
 #endif
 
+#if __GNUC_MINOR__ > 0
 #define __compiletime_object_size(obj) __builtin_object_size(obj, 0)
+#endif
 #if __GNUC_MINOR__ >= 4
 #define __compiletime_warning(message) __attribute__((warning(message)))
 #define __compiletime_error(message) __attribute__((error(message)))