Skip to content

Commit 96842c5

Browse files
committed
limit C headers to freestanding ones
inttypes.h is not part of the subset of standard headers for freestanding environments. Replace it with stdint.h. Also include string.h with quotes, since we provide it. Signed-off-by: Paolo Bonzini <[email protected]>
1 parent 5014423 commit 96842c5

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

include/bios.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#ifndef BIOS_H_
22
#define BIOS_H_
33

4-
#include <inttypes.h>
4+
#include <stdint.h>
55
#include <stddef.h>
66
#include <stdbool.h>
77

include/string.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#define BIOS_STRING_H
33

44
#include <stddef.h>
5-
#include <inttypes.h>
5+
#include <stdint.h>
66

77
unsigned long strlen(const char *buf);
88
char *strcat(char *dest, const char *src);

malloc.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include <inttypes.h>
1+
#include <stdint.h>
22
#include "string.h"
33
#include "bios.h"
44

pci.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#include "bios.h"
22
#include "ioport.h"
33
#include "pci.h"
4-
#include <string.h>
4+
#include "string.h"
55

66
static uint16_t addend;
77
static uint8_t bus, bridge_head;

smbios.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include <inttypes.h>
1+
#include <stdint.h>
22
#include "smbios.h"
33
#include "string.h"
44
#include "fw_cfg.h"

0 commit comments

Comments
 (0)