-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modifications to allow building of toolset in OpenBSD #1392
Conversation
@@ -1172,7 +1172,7 @@ stlink_t *stlink_open_usb(enum ugly_loglevel verbose, enum connect_type connect, | |||
|
|||
if (ret) { continue; } // could not open device | |||
|
|||
uint32_t serial_len = stlink_serial(handle, &desc, sl->serial); | |||
uint32_t serial_len = (uint32_t)stlink_serial(handle, &desc, sl->serial); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would simply change the type of serial_len
variable to size_t
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Ant-ON: We could alternatively also change stlink_serial() to uint32_t.
This should be safe on all common architectures as well.
@@ -1375,7 +1375,7 @@ static uint32_t stlink_probe_usb_devs(libusb_device **devs, stlink_t **sldevs[], | |||
break; | |||
} | |||
|
|||
uint32_t serial_len = stlink_serial(handle, &desc, serial); | |||
uint32_t serial_len = (uint32_t)stlink_serial(handle, &desc, serial); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and this too
@Ilgrim: Please address these points in order to proceed. |
@Nightwalker-87 Sure! I will make the suggested changes 🙂 |
@Ilgrim: I'm looking forward to merge this PR in order to proceed... |
I'll merge this with additional changes afterwards, as missing care on this PR delays unnecessarily delays any further proceedings. 👎 |
I am using OpenBSD for some microcontroller work and I needed these tools. As far I was not able to compile with the vanilla code, I have modified just a little for be able to compile in OpenBSD 7.4. Build tested in OpenBSD 7.4 and Debian 12.5.
I hope this can be somehow useful.