freebsd / kyua

Testing framework for infrastructure software
BSD 3-Clause "New" or "Revised" License
147 stars 42 forks source link

utils: address the deprecated readdir_r function usage #184

Open ckhardin opened 5 years ago

ckhardin commented 5 years ago

utils/fs/directory.cpp: In member function ‘void utils::fs::detail::directory_iterator::impl::next()’: utils/fs/directory.cpp:201:15: error: ‘int readdir_r(DIR, dirent, dirent)’ is deprecated [-Werror=deprecated-declarations] if (::readdir_r(_dirp, &_dirent, &result) == -1) { ^~~~~ In file included from utils/fs/directory.cpp:34: /usr/include/dirent.h:183:12: note: declared here extern int readdir_r (DIR restrict dirp, ^~~~~ utils/fs/directory.cpp:201:49: error: ‘int readdir_r(DIR, dirent*, dirent*)’ is deprecated [-Werror=deprecated-declarations] if (::readdir_r(_dirp, &_dirent, &result) == -1) { ^ In file included from utils/fs/directory.cpp:34: /usr/include/dirent.h:183:12: note: declared here extern int readdir_r (DIR restrict dirp, ^~~~~ utils/fs/directory.cpp:201:49: error: ‘int readdir_r(DIR, dirent, dirent)’ is deprecated [-Werror=deprecated-declarations] if (::readdir_r(_dirp, &_dirent, &result) == -1) { ^ In file included from utils/fs/directory.cpp:34: /usr/include/dirent.h:183:12: note: declared here extern int readdir_r (DIR *restrict dirp, ^~~~~ cc1plus: all warnings being treated as errors

jmmv commented 5 years ago

@googlebot rescan

(Mass-triggering a rescan of all open PRs as I have just configured automated CLA checks but the bot won't go through the backlog on its own.)

googlebot commented 5 years ago

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

:memo: Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here (e.g. I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

ngie-eign commented 5 years ago

@ckhardin: is it ok if I pick this review up? I noticed this problem when I was trying to compile kyua on Fedora 29 with g++, so I'd like to make forward progress with the issue that you started working on.

ckhardin commented 5 years ago

@ngie-eign - that's fine, we patched locally with this change to get it going.

ngie-eign commented 5 years ago

@ngie-eign - that's fine, we patched locally with this change to get it going.

When you say, "locally", do you mean Fedora Linux?

ckhardin commented 5 years ago

I signed it!

googlebot commented 5 years ago

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. In order to pass this check, please resolve this problem and have the pull request author add another comment and the bot will run again. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

ckhardin commented 5 years ago

@ngie-eign - no, buildroot - we do an embedded build, so we add patches into buildroot per package to things to compile.

ngie-eign commented 5 years ago

@ngie-eign - no, buildroot - we do an embedded build, so we add patches into buildroot per package to things to compile.

Ah, gotcha.

ngie-eign commented 5 years ago

@googlebot rescan

ngie-eign commented 5 years ago

@googlebot rescan

I guess I can't do that :D.