Skip to content

Commit

Permalink
Remove unused XHTONS and arpa/inet.h.
Browse files Browse the repository at this point in the history
  • Loading branch information
dgarske committed Jan 26, 2024
1 parent 0adf473 commit b27e6c5
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions wolftpm/tpm2_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ typedef int64_t INT64;
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <arpa/inet.h>

#ifdef WOLFTPM_USER_SETTINGS
#include "user_settings.h"
Expand Down Expand Up @@ -231,20 +230,6 @@ typedef int64_t INT64;
#ifndef WOLFTPM_CUSTOM_TYPES
#include <stdlib.h>

#ifndef XHTONS
/* WOLFCRYPT_ONLY means no wolfio and no arpa/inet.h */
#ifdef WOLFCRYPT_ONLY
#ifdef BIG_ENDIAN_ORDER
#define XHTONS(s) (s)
#else
#define XHTONS(s) ((((s) & 0xff) << 8) | (((s) & 0xff00) >> 8))
#endif
#else
#include <arpa/inet.h>
#define XHTONS(s) htons((s))
#endif
#endif

#define XSTRTOL(s,e,b) strtol((s),(e),(b))
#define XATOI(s) atoi((s))

Expand Down

0 comments on commit b27e6c5

Please sign in to comment.