Skip to content

Commit

Permalink
Use stdint.h types
Browse files Browse the repository at this point in the history
u_int_* aren't standard, but uint* are. Use those instead for musl compat.

Bug: https://bugs.gentoo.org/832969
Signed-off-by: Sam James <[email protected]>
  • Loading branch information
thesamesam committed Oct 15, 2023
1 parent 3ab9711 commit 09da9c8
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 5 deletions.
4 changes: 3 additions & 1 deletion hdsploader/digiface_firmware.dat
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include <stdint.h>

/* stored in little-endian */
static u_int32_t digiface_firmware[24413] = {
static uint32_t digiface_firmware[24413] = {
0xffffffff, 0x66aa9955, 0x8001000c, 0xe0000000, 0x8006800c, 0xb0000000,
0x8004800c, 0xb4fc0100, 0x8003000c, 0x00000000, 0x8001000c, 0x90000000,
0x8004000c, 0x00000000, 0x8001000c, 0x80000000, 0x0002000c, 0x581a000a,
Expand Down
4 changes: 3 additions & 1 deletion hdsploader/digiface_firmware_rev11.dat
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include <stdint.h>

/* stored in little-endian */
static u_int32_t digiface_firmware_rev11[24413] = {
static uint32_t digiface_firmware_rev11[24413] = {
0xffffffff, 0x66aa9955, 0x8001000c, 0xe0000000, 0x8006800c, 0xb0000000,
0x8004800c, 0xb4fc0100, 0x8003000c, 0x00000000, 0x8001000c, 0x90000000,
0x8004000c, 0x00000000, 0x8001000c, 0x80000000, 0x0002000c, 0x581a000a,
Expand Down
4 changes: 3 additions & 1 deletion hdsploader/multiface_firmware.dat
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include <stdint.h>

/* stored in little-endian */
static u_int32_t multiface_firmware[24413] = {
static uint32_t multiface_firmware[24413] = {
0xffffffff, 0x66aa9955, 0x8001000c, 0xe0000000, 0x8006800c, 0xb0000000,
0x8004800c, 0xb4fc0100, 0x8003000c, 0x00000000, 0x8001000c, 0x90000000,
0x8004000c, 0x00000000, 0x8001000c, 0x80000000, 0x0002000c, 0x581a000a,
Expand Down
4 changes: 3 additions & 1 deletion hdsploader/multiface_firmware_rev11.dat
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include <stdint.h>

/* stored in little-endian */
static u_int32_t multiface_firmware_rev11[24413] = {
static uint32_t multiface_firmware_rev11[24413] = {
0xffffffff, 0x66aa9955, 0x8001000c, 0xe0000000, 0x8006800c, 0xb0000000,
0x8004800c, 0xb4fc0100, 0x8003000c, 0x00000000, 0x8001000c, 0x90000000,
0x8004000c, 0x00000000, 0x8001000c, 0x80000000, 0x0002000c, 0x581a000a,
Expand Down
3 changes: 2 additions & 1 deletion hdsploader/tobin.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <unistd.h>
#include <endian.h>

Expand All @@ -8,7 +9,7 @@
#include "multiface_firmware.dat"
#include "multiface_firmware_rev11.dat"

int write_bin_file(u_int32_t *array, const char *filename)
int write_bin_file(uint32_t *array, const char *filename)
{
FILE *out;

Expand Down

0 comments on commit 09da9c8

Please sign in to comment.