// 32-bit Android has only timegm64() and not timegm().
// We replicate the behaviour of timegm() when the result overflows time_t.
+#endif /* ENABLE_ANDROID */
+
+#ifdef COMPAT_IPTOS
+
+#ifndef IPTOS_DSCP_MASK
#define IPTOS_DSCP_MASK 0xfc
+#endif
+#ifndef IPTOS_DSCP
#define IPTOS_DSCP(x) ((x) & IPTOS_DSCP_MASK)
+#endif
+#ifndef IPTOS_DSCP_AF11
#define IPTOS_DSCP_AF11 0x28
#define IPTOS_DSCP_AF12 0x30
#define IPTOS_DSCP_AF13 0x38
#define IPTOS_DSCP_AF42 0x90
#define IPTOS_DSCP_AF43 0x98
#define IPTOS_DSCP_EF 0xb8
+#endif
+#ifndef IPTOS_CLASS_MASK
#define IPTOS_CLASS_MASK 0xe0
+#endif
+#ifndef IPTOS_CLASS
#define IPTOS_CLASS(class) ((class) & IPTOS_CLASS_MASK)
+#endif
+#ifndef IPTOS_CLASS_CS0
#define IPTOS_CLASS_CS0 0x00
#define IPTOS_CLASS_CS1 0x20
#define IPTOS_CLASS_CS2 0x40
#define IPTOS_CLASS_CS5 0xa0
#define IPTOS_CLASS_CS6 0xc0
#define IPTOS_CLASS_CS7 0xe0
+#endif
#define IPTOS_CLASS_DEFAULT IPTOS_CLASS_CS0
-#endif
+#endif /* COMPAT_IPTOS */
#endif /* COMPAT_H */
#include "input/mpegts/scanfile.h"
#include <netinet/ip.h>
-
-#ifndef IPTOS_CLASS_CS0
-#define IPTOS_CLASS_CS0 0x00
-#define IPTOS_CLASS_CS1 0x20
-#define IPTOS_CLASS_CS2 0x40
-#define IPTOS_CLASS_CS3 0x60
-#define IPTOS_CLASS_CS4 0x80
-#define IPTOS_CLASS_CS5 0xa0
-#define IPTOS_CLASS_CS6 0xc0
-#define IPTOS_CLASS_CS7 0xe0
-#endif
+#define COMPAT_IPTOS
+#include "compat.h"
static void config_muxconfpath_notify ( void *o, const char *lang );
#include "notify.h"
#include "access.h"
#include "dvr/dvr.h"
+#define COMPAT_IPTOS
+#include "compat.h"
#if ENABLE_LIBSYSTEMD_DAEMON
#include <systemd/sd-daemon.h>
/**
*
*/
-#ifndef IPTOS_DSCP_MASK
-#define IPTOS_DSCP_MASK 0xfc
-#endif
-
int
socket_set_dscp(int sockfd, uint32_t dscp, char *errbuf, size_t errbufsize)
{