From 82f9d834ad772b2f16b6524f679d14d8a7afe881 Mon Sep 17 00:00:00 2001 From: Gabriele Contini <gcontini@users.noreply.github.com> Date: 周二, 10 9月 2019 23:29:10 +0800 Subject: [PATCH] fix issue #37 tests in windows --- src/library/os/os.h | 13 ++++++++++--- 1 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/library/os/os.h b/src/library/os/os.h index 9947378..7eea3eb 100644 --- a/src/library/os/os.h +++ b/src/library/os/os.h @@ -2,7 +2,7 @@ * os-dependent.hpp * * Created on: Mar 29, 2014 - * Author: devel + * */ #ifndef OS_DEPENDENT_HPP_ @@ -14,14 +14,18 @@ #include "../base/base.h" #include <stddef.h> +#include <string.h> +#include <ctype.h> +#include <sys/types.h> //definition of size_t #include <stdlib.h> #ifdef __unix__ +#include <unistd.h> #include <stdbool.h> #endif typedef enum { - NONE, VMWARE + NONE, CONTAINER, VM } VIRTUALIZATION; typedef enum { @@ -31,7 +35,7 @@ typedef struct { int id; char description[1024]; - unsigned char mac_address[6]; + unsigned char mac_address[8]; unsigned char ipv4_address[4]; IFACE_TYPE type; } OsAdapterInfo; @@ -48,6 +52,7 @@ size_t * adapter_info_size); FUNCTION_RETURN getDiskInfos(DiskInfo * diskInfos, size_t * disk_info_size); FUNCTION_RETURN getUserHomePath(char[MAX_PATH]); +FUNCTION_RETURN getModuleName(char buffer[MAX_PATH]); FUNCTION_RETURN getCpuId(unsigned char identifier[6]); FUNCTION_RETURN getMachineName(unsigned char identifier[6]); /** @@ -72,6 +77,8 @@ VIRTUALIZATION getVirtualization(); void os_initialize(); +FUNCTION_RETURN verifySignature(const char* stringToVerify, const char* signatureB64); + #ifdef __cplusplus } #endif -- Gitblit v1.9.1