summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md14
-rw-r--r--src/kernel/net.c16
2 files changed, 22 insertions, 8 deletions
diff --git a/README.md b/README.md
index a46423e..1e60477 100644
--- a/README.md
+++ b/README.md
@@ -13,6 +13,7 @@ The dnbd3 components can be built for the following Linux kernel versions and Un
- Archlinux with **Linux kernel 5.9.x** or **5.4.x**
- Ubuntu 20.04 with **Linux kernel 5.4.x**
+ - Ubuntu 18.04 with **Linux kernel 4.19.x**
- CentOS 8 with **Linux kernel 4.18.x**
- FreeBSD 12.1 (only user space programs, eg. dnbd3-server)
@@ -50,6 +51,19 @@ apt-get install git \
Note that `afl` is not available on Ubuntu 20.04 and should be built from the [original sources](https://github.com/google/AFL).
+#### Ubuntu 18.04 with Linux kernel 4.19.x
+```shell
+apt-get install git \
+ make \
+ cmake \
+ gcc \
+ linux-headers-generic \
+ libfuse-dev \
+ libjansson-dev \
+ afl \
+ rpm
+```
+
#### CentOS 8 with Linux kernel 4.18.x
```shell
yum install git \
diff --git a/src/kernel/net.c b/src/kernel/net.c
index a044be2..a0444d2 100644
--- a/src/kernel/net.c
+++ b/src/kernel/net.c
@@ -55,24 +55,24 @@
*/
#define __dnbd3_dev_dbg_host(dev, host, fmt, ...) do { \
if ((host).type == HOST_IP4) { \
- dev_dbg(dnbd3_device_to_dev((dev)), "(%pI4:%d): " fmt, (host).addr, (int)ntohs((host).port) __VA_OPT__(,) __VA_ARGS__); \
+ dev_dbg(dnbd3_device_to_dev((dev)), "(%pI4:%d): " fmt, (host).addr, (int)ntohs((host).port), ##__VA_ARGS__); \
} else { \
- dev_dbg(dnbd3_device_to_dev((dev)), "([%pI6]:%d): " fmt, (host).addr, (int)ntohs((host).port) __VA_OPT__(,) __VA_ARGS__); \
+ dev_dbg(dnbd3_device_to_dev((dev)), "([%pI6]:%d): " fmt, (host).addr, (int)ntohs((host).port), ##__VA_ARGS__); \
} \
} while (0)
#define __dnbd3_dev_err_host(dev, host, fmt, ...) do { \
if ((host).type == HOST_IP4) { \
- dev_err(dnbd3_device_to_dev((dev)), "(%pI4:%d): " fmt, (host).addr, (int)ntohs((host).port) __VA_OPT__(,) __VA_ARGS__); \
+ dev_err(dnbd3_device_to_dev((dev)), "(%pI4:%d): " fmt, (host).addr, (int)ntohs((host).port), ##__VA_ARGS__); \
} else { \
- dev_err(dnbd3_device_to_dev((dev)), "([%pI6]:%d): " fmt, (host).addr, (int)ntohs((host).port) __VA_OPT__(,) __VA_ARGS__); \
+ dev_err(dnbd3_device_to_dev((dev)), "([%pI6]:%d): " fmt, (host).addr, (int)ntohs((host).port), ##__VA_ARGS__); \
} \
} while (0)
-#define dnbd3_dev_dbg_host_cur(dev, fmt, ...) __dnbd3_dev_dbg_host((dev), (dev)->cur_server.host, fmt __VA_OPT__(,) __VA_ARGS__)
-#define dnbd3_dev_err_host_cur(dev, fmt, ...) __dnbd3_dev_err_host((dev), (dev)->cur_server.host, fmt __VA_OPT__(,) __VA_ARGS__)
-#define dnbd3_dev_dbg_host_alt(dev, fmt, ...) __dnbd3_dev_dbg_host((dev), (dev)->alt_servers[i].host, fmt __VA_OPT__(,) __VA_ARGS__)
-#define dnbd3_dev_err_host_alt(dev, fmt, ...) __dnbd3_dev_err_host((dev), (dev)->alt_servers[i].host, fmt __VA_OPT__(,) __VA_ARGS__)
+#define dnbd3_dev_dbg_host_cur(dev, fmt, ...) __dnbd3_dev_dbg_host((dev), (dev)->cur_server.host, fmt, ##__VA_ARGS__)
+#define dnbd3_dev_err_host_cur(dev, fmt, ...) __dnbd3_dev_err_host((dev), (dev)->cur_server.host, fmt, ##__VA_ARGS__)
+#define dnbd3_dev_dbg_host_alt(dev, fmt, ...) __dnbd3_dev_dbg_host((dev), (dev)->alt_servers[i].host, fmt, ##__VA_ARGS__)
+#define dnbd3_dev_err_host_alt(dev, fmt, ...) __dnbd3_dev_err_host((dev), (dev)->alt_servers[i].host, fmt, ##__VA_ARGS__)
static inline dnbd3_server_t *get_free_alt_server(dnbd3_device_t * const dev)
{