Skip to content

Commit ca645b7

Browse files
jayantkJayant Krishnamurthy
and
Jayant Krishnamurthy
authored
make the rust build on macs (#259)
Co-authored-by: Jayant Krishnamurthy <[email protected]>
1 parent 639af13 commit ca645b7

File tree

4 files changed

+2
-18
lines changed

4 files changed

+2
-18
lines changed

program/c/src/oracle/native/upd_aggregate.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,6 @@ char heap_start[8192];
66
#define PC_HEAP_START (heap_start)
77
#define static_assert _Static_assert
88

9-
typedef signed char int8_t;
10-
typedef unsigned char uint8_t;
11-
typedef signed short int16_t;
12-
typedef unsigned short uint16_t;
13-
typedef signed int int32_t;
14-
typedef unsigned int uint32_t;
15-
typedef signed long int int64_t;
16-
typedef unsigned long int uint64_t;
17-
189
#include "../upd_aggregate.h"
1910

2011
extern bool c_upd_aggregate( pc_price_t *ptr, uint64_t slot, int64_t timestamp ){

program/c/src/oracle/oracle.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#pragma once
22

33
#include <stdbool.h>
4+
#include "util/compat_stdint.h"
45

56
#ifdef __cplusplus
67
extern "C" {

program/rust/build.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ fn main() {
99

1010
//generate and write bindings
1111
let bindings = Builder::default()
12+
.clang_arg("-I../../../solana/sdk/bpf/c/inc/")
1213
.header("./src/bindings.h")
1314
.parse_callbacks(Box::new(parser))
1415
.rustfmt_bindings(true)

program/rust/src/bindings.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,6 @@
22

33
#define static_assert _Static_assert
44

5-
typedef signed char int8_t;
6-
typedef unsigned char uint8_t;
7-
typedef signed short int16_t;
8-
typedef unsigned short uint16_t;
9-
typedef signed int int32_t;
10-
typedef unsigned int uint32_t;
11-
typedef signed long int int64_t;
12-
typedef unsigned long int uint64_t;
13-
145
#include <stddef.h>
156
#include "../../c/src/oracle/oracle.h"
167

0 commit comments

Comments
 (0)