]> git.ipfire.org Git - people/ms/strongswan.git/commitdiff
watcher: Use Windows read/write(2) wrappers instead of compile-conditions
authorMartin Willi <martin@revosec.ch>
Thu, 6 Nov 2014 13:20:28 +0000 (14:20 +0100)
committerMartin Willi <martin@revosec.ch>
Fri, 21 Nov 2014 11:02:08 +0000 (12:02 +0100)
src/libstrongswan/processing/watcher.c

index 07c1b6dc944f8defaefb56bd03dfefbf0a12d74e..9eaa3f142b95fc21ab31d4ff77972f878ee11431 100644 (file)
@@ -118,11 +118,7 @@ static void update(private_watcher_t *this)
        this->pending = TRUE;
        if (this->notify[1] != -1)
        {
-#ifdef WIN32
-               if (send(this->notify[1], buf, sizeof(buf), 0) == -1)
-#else
                if (write(this->notify[1], buf, sizeof(buf)) == -1)
-#endif
                {
                        DBG1(DBG_JOB, "notifying watcher failed: %s", strerror(errno));
                }
@@ -338,11 +334,7 @@ static job_requeue_t watch(private_watcher_t *this)
                        {
                                while (TRUE)
                                {
-#ifdef WIN32
-                                       len = recv(this->notify[0], buf, sizeof(buf), 0);
-#else
                                        len = read(this->notify[0], buf, sizeof(buf));
-#endif
                                        if (len == -1)
                                        {
                                                if (errno != EAGAIN && errno != EWOULDBLOCK)