| 1 |
/* -*- linux-c -*- |
| 2 |
* Networking compatibility defines. |
| 3 |
* Copyright (C) 2014 Red Hat Inc. |
| 4 |
* |
| 5 |
* This file is part of systemtap, and is free software. You can |
| 6 |
* redistribute it and/or modify it under the terms of the GNU General |
| 7 |
* Public License (GPL); either version 2, or (at your option) any |
| 8 |
* later version. |
| 9 |
*/ |
| 10 |
|
| 11 |
#ifndef _COMPAT_NET_H_ |
| 12 |
#define _COMPAT_NET_H_ |
| 13 |
|
| 14 |
#include <linux/net.h> |
| 15 |
|
| 16 |
/* Older kernels don't have this defined and don't support |
| 17 |
* sys_sendmmsg(2). We just need the define to get things to compile. */ |
| 18 |
#ifndef SYS_SENDMMSG |
| 19 |
#define SYS_SENDMMSG 20 |
| 20 |
#endif |
| 21 |
|
| 22 |
/* Older kernels don't have these defined. On some kernels these are |
| 23 |
* enums, but the following code should still work. */ |
| 24 |
#ifndef SHUT_RD |
| 25 |
#define SHUT_RD 0 |
| 26 |
#endif |
| 27 |
#ifndef SHUT_WR |
| 28 |
#define SHUT_WR 1 |
| 29 |
#endif |
| 30 |
#ifndef SHUT_RDWR |
| 31 |
#define SHUT_RDWR 2 |
| 32 |
#endif |
| 33 |
|
| 34 |
#endif /* _COMPAT_NET_H_ */ |