[PATCH 58/62] libbsp/powerpc/shared/uboot_getenv.c: Fix warnings
Joel Sherrill
joel.sherrill at oarcorp.com
Wed Oct 15 20:00:48 UTC 2014
---
c/src/lib/libbsp/powerpc/shared/uboot_getenv.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/c/src/lib/libbsp/powerpc/shared/uboot_getenv.c b/c/src/lib/libbsp/powerpc/shared/uboot_getenv.c
index 9125601..43ef4af 100644
--- a/c/src/lib/libbsp/powerpc/shared/uboot_getenv.c
+++ b/c/src/lib/libbsp/powerpc/shared/uboot_getenv.c
@@ -7,9 +7,16 @@
* http://www.rtems.org/license/LICENSE.
*/
+#include <bsp.h>
+
+/*
+ * If the BSP variant does not have UBoot, then disable all contents
+ * of this file.
+ */
+#if defined(HAS_UBOOT)
+
#include <stdint.h>
#include <string.h>
-#include <bsp.h>
/* Assumed to be provided by BSP */
extern const uint8_t *uboot_environment;
@@ -64,4 +71,4 @@ const char *bsp_uboot_getenv(
return NULL;
}
-
+#endif /* defined(HAS_UBOOT) */
--
1.9.3
More information about the devel
mailing list