aboutsummaryrefslogtreecommitdiffstats
path: root/mpm
diff options
context:
space:
mode:
authorCiro Nishiguchi <ciro.nishiguchi@ni.com>2020-01-15 12:39:11 -0600
committerBrent Stapleton <brent.stapleton@ettus.com>2020-01-16 10:45:24 -0800
commit74c2e7224681088a593eef25f87281c1882d2dec (patch)
tree8373ca463a4cf71327f96bc7849452ff541d0fa4 /mpm
parent427b564a743acc3c645bda1007d9d41405397cf2 (diff)
downloaduhd-74c2e7224681088a593eef25f87281c1882d2dec.tar.gz
uhd-74c2e7224681088a593eef25f87281c1882d2dec.tar.bz2
uhd-74c2e7224681088a593eef25f87281c1882d2dec.zip
mpm: Add compile flag to fix missing definition
In some environments _GNU_SOURCE must be defined to use O_LARGEFILE.
Diffstat (limited to 'mpm')
-rw-r--r--mpm/lib/i2c/CMakeLists.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/mpm/lib/i2c/CMakeLists.txt b/mpm/lib/i2c/CMakeLists.txt
index f083325a7..105e9a8b0 100644
--- a/mpm/lib/i2c/CMakeLists.txt
+++ b/mpm/lib/i2c/CMakeLists.txt
@@ -8,5 +8,9 @@ set(I2C_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/i2c_regs_iface.cpp
${CMAKE_CURRENT_SOURCE_DIR}/i2cdev.c
)
+set_source_files_properties(
+ ${CMAKE_CURRENT_SOURCE_DIR}/i2cdev.c
+ PROPERTIES COMPILE_FLAGS "-D_GNU_SOURCE"
+)
USRP_PERIPHS_ADD_OBJECT(i2c ${I2C_SOURCES})