-
Notifications
You must be signed in to change notification settings - Fork 7
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
Unable to compile on OpenBSD 7.2 #16
Comments
G'day, @hex7c! Sorry for the delay (again), I was a little busy yesterday. 😅
I think the solution may be that: use an |
I think I can try to help with some hacking maybe, but I don't know about |
Good idea! I wasn't sure what to actually do with the ifdefs after defining them, so I'm glad you came up to this. I'll do some reading later today on the manual pages on how exactly |
Oh, thanks. I just was thinking I said something stupid/redundant.
Great! I didn't found a lot of information (maybe I'm searching in the wrong way) about how to transition between
Well, that's interesting. If you don't mind me asking, are you in an University or something? At least I've never saw this type of infrastructure outside of one. |
In the initial comment on the issue, I put links to the OpenBSD versions of the manual pages; I'll re-post them just for reference again:
Nope! I go to both a high school and a career technical center (for sysadmin/netadmin stuff) in the same day, though the Gentoo servers are unrelated to it. The servers are my own I host in my basement, they're pretty fun to play with. |
I saw them, but Linux ones are more detailed somehow, that's why I posted it.
That sounds cool! I'm in the end of my last year in high school by the way. |
Oh -- I also forgot to mention: |
I'm thinking to test what OpenBSD version the system is, we can use https://github.com/openbsd/src/blob/d3031145007cbcaacf358dd2018498355a088b8f/sys/sys/param.h#L44 |
So I think we could disable
No problem! It's always interesting to know when we can strip redundant code (even for older systems) and make things better, even if it is a separate issue.
I think it's the best way. #if defined(__OpenBSD__)
#include <sys/param.h>
#if OpenBSD >= 201311
int
getdirentries(int fd, char buf[], int nbytes, long basep[]) {
/* TODO: Write boilerplate for opendir() and readdir(). */
}
#endif
#endif |
It appears to still be present in glibc, which is likely why it doesn't throw an error whilst compiling using the header. I think we could leave it in for now for Linux systems, and once we get at least OpenBSD working, then we can possibly look into stripping redundant code on modern systems.
That's similar to what I was thinking. I've been tired & busy all day (and probably will be tomorrow as well) so I didnt get the chance to do a lot, but this definitely looks good. Apologies for the lack of results, I got a lot of life stuff to juggle. |
It's O.k., implement it when you can/want to. 😃 |
Good afternoon! I've added the "bug" label to this, just a pure formality. |
Alright, that looks good to me. Apologies for not working on this, I've been spending time off on the holidays to work on personal stuff and hang out with friends and family. Hope you understand. |
Sure, me too! |
Sorry for bothering again, but I've just added the sketch to |
Hey there! Just wanted to say I'm gonna start working on this again. Thanks for being patient. 🙂 |
Oh, good. Thanks so much!
Oh, you're welcome. |
Hey there! So I wanted to say that I was the original user who created this issue (hex7c) but it ends up something happened to my old GitHub account while I was away & busy with life stuff. I wanted to give an update so hopefully @takusuman and anyone else reading this issue understands what happened. I've been incredibly busy with schoolwork, amongst other things. I'm going to take a look into this issue when time allows; I hope you understand. |
I believe this bug can be closed as #21 was merged. Note that there are some other OpenBSD platform-specific issues mentioned in the pull request, but those can be for another issue. @takusuman |
Sure. |
libcommon
compiles and includesdirent.h
on OpenBSD, however the functiongetdirentries
(2) has been removed since OpenBSD 5.4 according to the manual pages. It has been replaced byreaddir
(3), see manual pages for getdirentries and readdir. This causes an "undefined symbol" error at compile time when attempting to use said function on another binary, in this casedu
.I will attempt to look into accommodating for this with
ifdef
s for post-5.4 OpenBSD machines; however I will not remove the function for pre-5.4 for compatibility with older versions. I will later test other BSDs, and if the same issue arises, I will comment here as well with my findings and look into fixing it.The text was updated successfully, but these errors were encountered: