summaryrefslogtreecommitdiff
path: root/src/3rd_party-static/libusbx-1.0.16/libusb/os/poll_posix.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rd_party-static/libusbx-1.0.16/libusb/os/poll_posix.c')
-rw-r--r--src/3rd_party-static/libusbx-1.0.16/libusb/os/poll_posix.c51
1 files changed, 0 insertions, 51 deletions
diff --git a/src/3rd_party-static/libusbx-1.0.16/libusb/os/poll_posix.c b/src/3rd_party-static/libusbx-1.0.16/libusb/os/poll_posix.c
deleted file mode 100644
index eeaf5dce49..0000000000
--- a/src/3rd_party-static/libusbx-1.0.16/libusb/os/poll_posix.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * poll_posix: poll compatibility wrapper for POSIX systems
- * Copyright © 2013 RealVNC Ltd.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- */
-
-#include <unistd.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <stdlib.h>
-
-#include "libusbi.h"
-
-int usbi_pipe(int pipefd[2])
-{
- int ret = pipe(pipefd);
- if (ret != 0) {
- return ret;
- }
- ret = fcntl(pipefd[1], F_GETFL);
- if (ret == -1) {
- usbi_dbg("Failed to get pipe fd flags: %d", errno);
- goto err_close_pipe;
- }
- ret = fcntl(pipefd[1], F_SETFL, ret | O_NONBLOCK);
- if (ret != 0) {
- usbi_dbg("Failed to set non-blocking on new pipe: %d", errno);
- goto err_close_pipe;
- }
-
- return 0;
-
-err_close_pipe:
- usbi_close(pipefd[0]);
- usbi_close(pipefd[1]);
- return ret;
-}