summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@oarcorp.com>2014-10-15 14:23:30 -0500
committerJoel Sherrill <joel.sherrill@oarcorp.com>2014-10-16 08:58:49 -0500
commite59d26fc1924b59c3ca8cec58b0b7b2898aa7609 (patch)
tree388ca66ecbbe6037d22c823aace35a4d3dcbae1e
parentlibbsp/powerpc/shared/startup/zerobss.c: Fix warnings (diff)
downloadrtems-e59d26fc1924b59c3ca8cec58b0b7b2898aa7609.tar.bz2
libbsp/powerpc/shared/uboot_getenv.c: Fix warnings
-rw-r--r--c/src/lib/libbsp/powerpc/shared/uboot_getenv.c11
1 files 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 912560193c..43ef4af81b 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) */