net: Make it possible to include net/buf.h even if CONFIG_NET_BUF=n

Since CONFIG_NET_BUF_USER_DATA_SIZE was not defined when
CONFIG_NET_BUF=n, compilation would fail on struct net_buf.user_data.

Signed-off-by: Tobias Svehagen <tobias.svehagen@gmail.com>
This commit is contained in:
Tobias Svehagen 2020-06-12 12:37:40 +02:00 committed by Johan Hedberg
commit a5147dc15c

View file

@ -15,6 +15,10 @@
#include <sys/util.h>
#include <zephyr.h>
#ifndef CONFIG_NET_BUF_USER_DATA_SIZE
#define CONFIG_NET_BUF_USER_DATA_SIZE 0
#endif
#ifdef __cplusplus
extern "C" {
#endif