From 6315e4503e7707dabf72f1ac659f4d3b03e9f71c Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Fri, 30 Nov 2018 15:05:09 +0100 Subject: [PATCH] dde_linux: adapt to changes in os/duration.h The Linux emulation library provides preprocessor macros for min() and max(), which now clash with implementation in duration.h. So, we disable those macros in the delay implementation. --- .../src/drivers/usb_host/spec/rpi/platform.cc | 1 - repos/dde_linux/src/include/lx_emul/impl/delay.h | 13 +++++++++++++ repos/dde_linux/src/lib/usb/spec/rpi/platform.cc | 1 - 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/repos/dde_linux/src/drivers/usb_host/spec/rpi/platform.cc b/repos/dde_linux/src/drivers/usb_host/spec/rpi/platform.cc index 781b88531..4d76d0261 100644 --- a/repos/dde_linux/src/drivers/usb_host/spec/rpi/platform.cc +++ b/repos/dde_linux/src/drivers/usb_host/spec/rpi/platform.cc @@ -20,7 +20,6 @@ /* emulation */ #include #include -#include /* dwc-otg */ #define new new_ diff --git a/repos/dde_linux/src/include/lx_emul/impl/delay.h b/repos/dde_linux/src/include/lx_emul/impl/delay.h index b9ddbbc45..523ed45fa 100644 --- a/repos/dde_linux/src/include/lx_emul/impl/delay.h +++ b/repos/dde_linux/src/include/lx_emul/impl/delay.h @@ -11,6 +11,15 @@ * version 2. */ +/* + * Disable preprocessor macros that are incompatible to Genode headers for this + * file. + */ +#pragma push_macro("max") +#pragma push_macro("min") +#undef max +#undef min + /* Genode includes */ #include @@ -49,3 +58,7 @@ void msleep(unsigned int msecs) void mdelay(unsigned long msecs) { msleep(msecs); } + + +#pragma pop_macro("max") +#pragma pop_macro("min") diff --git a/repos/dde_linux/src/lib/usb/spec/rpi/platform.cc b/repos/dde_linux/src/lib/usb/spec/rpi/platform.cc index 13fda8ada..b16e52087 100644 --- a/repos/dde_linux/src/lib/usb/spec/rpi/platform.cc +++ b/repos/dde_linux/src/lib/usb/spec/rpi/platform.cc @@ -20,7 +20,6 @@ /* emulation */ #include #include -#include /* dwc-otg */ #define new new_