Merge pull request #14 from Newbytee/fix-debian-10-build

Preliminary Debian 10 build fix
This commit is contained in:
Andrew Hyatt 2020-04-18 09:41:40 -04:00 committed by GitHub
commit a1b6f512aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 0 deletions

View File

@ -78,7 +78,11 @@ typedef task_t proc_t;
#define pthhashhead list_head
#define nanoseconds_to_absolutetime(ns, to) *to = ns
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0)
#define microuptime(t) ktime_get_ts64(t)
#else
#define microuptime(t) ktime_get_ts(t)
#endif
#define tvtoabstime(t) ((t)->tv_nsec + ((uint64_t)(t)->tv_sec) * NSEC_PER_SEC)
// To shut up a few warnings

View File

@ -32,6 +32,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <linux/version.h>
#ifndef DUCT__PRE_LINUX_TYPES_H
#define DUCT__PRE_LINUX_TYPES_H
// include/linux/socket.h
@ -54,7 +56,11 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// include/linux/time.h
#define timeval linux_timeval
#define timezone linux_timezone
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0)
#define timespec64 linux_timespec
#else
#define timespec linux_timespec
#endif
// include/linux/semaphore.h