Skip to content

Commit

Permalink
fix-me: Add a sketch for fixing issue #16.
Browse files Browse the repository at this point in the history
  • Loading branch information
takusuman committed Dec 26, 2022
1 parent f62278d commit e617e74
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions libcommon/getdir.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,23 @@
#include <errno.h>
#include <string.h>

/*
* TODO: Write a boilerplate for getdirentries() that uses opendir() and
* readdir(). Needed for OpenBSD releases greater than 5.4 --- maybe other
* systems nowadays --- since getdirentries() got deprecated there.
* The sketch below shall work as a guide for writing it.
*
#if defined(__OpenBSD__)
#include <sys/param.h>
#if OpenBSD >= 201311
int
getdirentries(int fd, char buf[], int nbytes, long basep[]) {
}
#endif
#endif
*/

#if defined (__UCLIBC__)
#include <linux/types.h>
#include <linux/dirent.h>
Expand Down

1 comment on commit e617e74

@takusuman
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not fixed yet! Just a sketch.

Please sign in to comment.