Skip to content

Commit

Permalink
Avoid conflicting efi_char16_t type definitions
Browse files Browse the repository at this point in the history
It's not necessary to define 'efi_char16_t' as 'wchar_t' since we don't
need any wchar functions. Besides, it may conflict with efivar-38. This
commit defines 'efi_char16_t' as 'uint16_t' and adds the conditional
check to avoid the potential conflict.

Fixes: #66

Signed-off-by: Gary Lin <glin@suse.com>
  • Loading branch information
lcp committed Jun 30, 2023
1 parent ae59d89 commit dd55c28
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/mokutil.h
Expand Up @@ -33,13 +33,14 @@
#define __MOKUTIL_H__

#include <ctype.h>
#include <wchar.h>

#include "signature.h"

typedef unsigned long efi_status_t;
typedef uint8_t efi_bool_t;
typedef wchar_t efi_char16_t; /* UNICODE character */
#ifndef efi_char16_t
typedef uint16_t efi_char16_t; /* UNICODE character */
#endif

typedef enum {
DELETE_MOK = 0,
Expand Down

0 comments on commit dd55c28

Please sign in to comment.