X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;ds=sidebyside;f=make%2Fcheck_eventfd.cpp;h=980d04485bb2774d896474c27a4f31ae50e4d424;hb=9f69e159adcc0892f0bdef16ac4617630737b156;hp=5fc72ee3b65c866655ab3bd22a4433bf8eb0a856;hpb=d02d6b05a3cb516ccaf69ceef19383513ad52292;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/make/check_eventfd.cpp b/make/check_eventfd.cpp index 5fc72ee3b..980d04485 100644 --- a/make/check_eventfd.cpp +++ b/make/check_eventfd.cpp @@ -1,6 +1,29 @@ +/* + * InspIRCd -- Internet Relay Chat Daemon + * + * + * This file is part of InspIRCd. InspIRCd is free software: you can + * redistribute it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation, version 2. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + + #include int main() { - int fd = eventfd(0, EFD_NONBLOCK); + eventfd_t efd_data; + int fd; + + fd = eventfd(0, EFD_NONBLOCK); + eventfd_read(fd, &efd_data); + return (fd < 0); }