]> git.ozlabs.org Git - ccan/blobdiff - ccan/iscsi/socket.c
ccan: Correct some poor conventions in _info includes
[ccan] / ccan / iscsi / socket.c
index 17c6ffee3b0370af99997fd127459b0fc8a51796..430be7211599c6ef65756c71d1b55c70e01585da 100644 (file)
@@ -15,6 +15,7 @@
    along with this program; if not, see <http://www.gnu.org/licenses/>.
 */
 
    along with this program; if not, see <http://www.gnu.org/licenses/>.
 */
 
+#include "config.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -31,6 +32,9 @@
 #include "iscsi.h"
 #include "iscsi-private.h"
 #include "dlinklist.h"
 #include "iscsi.h"
 #include "iscsi-private.h"
 #include "dlinklist.h"
+#if HAVE_SYS_FILIO_H
+#include <sys/filio.h>
+#endif
 
 static void set_nonblocking(int fd)
 {
 
 static void set_nonblocking(int fd)
 {
@@ -41,7 +45,6 @@ static void set_nonblocking(int fd)
 
 int iscsi_connect_async(struct iscsi_context *iscsi, const char *target, iscsi_command_cb cb, void *private_data)
 {
 
 int iscsi_connect_async(struct iscsi_context *iscsi, const char *target, iscsi_command_cb cb, void *private_data)
 {
-       int tpgt = -1;
        int port = 3260;
        char *str;
        char *addr;
        int port = 3260;
        char *str;
        char *addr;
@@ -69,7 +72,6 @@ int iscsi_connect_async(struct iscsi_context *iscsi, const char *target, iscsi_c
        
        /* check if we have a target portal group tag */
        if ((str = rindex(addr, ',')) != NULL) {
        
        /* check if we have a target portal group tag */
        if ((str = rindex(addr, ',')) != NULL) {
-               tpgt = atoi(str+1);
                str[0] = 0;
        }
 
                str[0] = 0;
        }