You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’m preparing a pull request that uses https://github.com/PaulStoffregen/cores/ as a submodule rather than having a copy of it in this repository, and also running rust-bindgen when building the teensy-sys crate. Bindgen (or presumably libclang, which bindgen uses) fails with this error:
cores/teensy3/WProgram.h:53:9: error: functions that differ only in their return type cannot be overloaded
/usr/include/stdlib.h:298:17: note: previous declaration is here
The first source line referenced is:
// WMath prototypesint32_trandom(void);
The second (on my system, Archlinux x86_64) is:
/* Return a random long integer between 0 and RAND_MAX inclusive. */externlongintrandom (void) __THROW;
I believe that long int is the same as int32_t on thumbv7em-none-eabi, but libclang seem to consider them different anyway. Changing the first line to use long works around the problem, but I’d rather not maintain a fork of the repository. So for now I’m adding a hack in teensy-sys/build.rs that does this replacement into a temporary file.
This issue is about getting rid of this hack eventually. Sending a pull request upstream would be best, but for now I don’t know if simply changing uint32_t to long is appropriate.
I’m preparing a pull request that uses https://github.com/PaulStoffregen/cores/ as a submodule rather than having a copy of it in this repository, and also running rust-bindgen when building the
teensy-sys
crate. Bindgen (or presumably libclang, which bindgen uses) fails with this error:The first source line referenced is:
The second (on my system, Archlinux x86_64) is:
I believe that
long int
is the same asint32_t
on thumbv7em-none-eabi, but libclang seem to consider them different anyway. Changing the first line to uselong
works around the problem, but I’d rather not maintain a fork of the repository. So for now I’m adding a hack inteensy-sys/build.rs
that does this replacement into a temporary file.This issue is about getting rid of this hack eventually. Sending a pull request upstream would be best, but for now I don’t know if simply changing
uint32_t
tolong
is appropriate.CC PaulStoffregen/cores#187, PaulStoffregen/cores#83
The text was updated successfully, but these errors were encountered: