diff options
author | Harald Welte <laforge@gnumonks.org> | 2017-01-15 17:58:29 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2017-01-23 12:20:33 +0000 |
commit | 44c0f63de64ffeaffff7429f3e5e474fe8dd5343 (patch) | |
tree | e40b9f309de9e67502a8fcb2de1cc102984ff0d6 /src/macaddr.c | |
parent | 505a22fc5102b69cdb7a910fb65da67e41d7f649 (diff) |
disable various code if building for bare-iron embedded
We don't have file-based I/O nor ethernet devices with mac addresses
when building for OsmocomBB.
Change-Id: I01a9e6d8dbe885dbeac2769b84931a4d44f7a3a5
Diffstat (limited to 'src/macaddr.c')
-rw-r--r-- | src/macaddr.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/macaddr.c b/src/macaddr.c index f83e0546..ceb1e0a3 100644 --- a/src/macaddr.c +++ b/src/macaddr.c @@ -26,6 +26,8 @@ /*! \file loggingrb.c */ +#include "config.h" + #include <stdint.h> #include <string.h> #include <stdlib.h> @@ -103,6 +105,8 @@ int osmo_get_macaddr(uint8_t *mac_out, const char *dev_name) #else +#if (!EMBEDDED) + #include <sys/ioctl.h> #include <net/if.h> #include <netinet/in.h> @@ -134,6 +138,8 @@ int osmo_get_macaddr(uint8_t *mac_out, const char *dev_name) return 0; } +#endif /* !EMBEDDED */ + #endif /*! @} */ |