]> git.proxmox.com Git - mirror_edk2.git/blobdiff - CryptoPkg/Include/OpenSslSupport.h
CryptoPkg: Enable ssl build in OpensslLib directly
[mirror_edk2.git] / CryptoPkg / Include / OpenSslSupport.h
index 239ae8bd6f417a5713a0bac652a366c6f37aa159..600578e780fd272b03ff2d767db6098e3f7f08e1 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Root include file to support building OpenSSL Crypto Library.\r
 \r
-Copyright (c) 2010 - 2015, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -69,7 +69,7 @@ typedef VOID  *FILE;
 #endif\r
 \r
 //\r
-// #defines from EFI Application Toolkit required to buiild Open SSL\r
+// #defines from EFI Application Toolkit required to build Open SSL\r
 //\r
 #define ENOMEM       12               /* Cannot allocate memory */\r
 #define EINVAL       22               /* Invalid argument */\r
@@ -92,7 +92,7 @@ typedef VOID  *FILE;
 #define LOG_CONS     0x02             /* log on the console if errors in sending */\r
 \r
 //\r
-// Macros from EFI Application Toolkit required to buiild Open SSL\r
+// Macros from EFI Application Toolkit required to build Open SSL\r
 //\r
 /* The offsetof() macro calculates the offset of a structure member\r
    in its structure.  Unfortunately this cannot be written down\r
@@ -102,7 +102,7 @@ typedef VOID  *FILE;
 #define offsetof(type, member) OFFSET_OF (type, member)\r
 \r
 //\r
-// Basic types from EFI Application Toolkit required to buiild Open SSL\r
+// Basic types from EFI Application Toolkit required to build Open SSL\r
 //\r
 typedef UINTN          size_t;\r
 typedef INTN           ssize_t;\r
@@ -118,9 +118,11 @@ typedef UINT16         nlink_t;
 typedef int            pid_t;\r
 typedef void           *DIR;\r
 typedef void           __sighandler_t (int);\r
+typedef UINT8          __uint8_t;\r
+typedef UINT8          sa_family_t;\r
 \r
 //\r
-// Structures from EFI Application Toolkit required to buiild Open SSL\r
+// Structures from EFI Application Toolkit required to build Open SSL\r
 //\r
 struct tm {\r
   int   tm_sec;     /* seconds after the minute [0-60] */\r
@@ -172,13 +174,19 @@ struct stat {
   INT64    st_qspare[2];\r
 };\r
 \r
+struct sockaddr {\r
+  __uint8_t sa_len;         /* total length */\r
+  sa_family_t sa_family;    /* address family */\r
+  char    sa_data[14];      /* actually longer; address value */\r
+};\r
+\r
 //\r
-// Externs from EFI Application Toolkit required to buiild Open SSL\r
+// Externs from EFI Application Toolkit required to build Open SSL\r
 //\r
 extern int errno;\r
 \r
 //\r
-// Function prototypes from EFI Application Toolkit required to buiild Open SSL\r
+// Function prototypes from EFI Application Toolkit required to build Open SSL\r
 //\r
 void           *malloc     (size_t);\r
 void           *realloc    (void *, size_t);\r
@@ -247,7 +255,7 @@ void           abort       (void);
 __sighandler_t *signal     (int, __sighandler_t *);\r
 \r
 //\r
-// Global variables from EFI Application Toolkit required to buiild Open SSL\r
+// Global variables from EFI Application Toolkit required to build Open SSL\r
 //\r
 extern FILE  *stderr;\r
 extern FILE  *stdin;\r
@@ -273,5 +281,6 @@ extern FILE  *stdout;
 #define localtime(timer)                  NULL\r
 #define gmtime_r(timer,result)            (result = NULL)\r
 #define atoi(nptr)                        AsciiStrDecimalToUintn(nptr)\r
+#define gettimeofday(tvp,tz)              do { (tvp)->tv_sec = time(NULL); (tvp)->tv_usec = 0; } while (0)\r
 \r
 #endif\r