Template
1
0
mirror of https://github.com/bol-van/zapret2.git synced 2026-03-14 06:13:09 +00:00

nfqws2: compile compat

This commit is contained in:
bol-van
2026-02-04 15:04:21 +03:00
parent 7e31dc9d89
commit 7f8f64a355
5 changed files with 59 additions and 15 deletions

27
nfq2/random.h Normal file
View File

@@ -0,0 +1,27 @@
#pragma once
// shim for old NDK and old gcc linux compilers
#include <sys/syscall.h>
#if defined(__linux__)
#if defined(__ANDROID__) && __ANDROID_API__ < 28 || !defined(SYS_getrandom)
#define NEED_GETRANDOM
#include <sys/types.h>
/* getrandom flags */
#define GRND_NONBLOCK 1
#define GRND_RANDOM 2
ssize_t getrandom(void *ptr, size_t len, unsigned int flags);
#else
#include <sys/random.h>
#endif
#endif