include config.h from lib/socket.c and use this to conditionaly
compile code to set sin_len on platforms that require this field in the sockaddr structures.
This commit is contained in:
@@ -4,7 +4,7 @@ libdir = @libdir@
|
||||
bindir = @bindir@
|
||||
LIBS="-lpopt"
|
||||
CC=gcc
|
||||
CFLAGS=-g -O0 -fPIC -Wall -W -I./include "-D_U_=__attribute__((unused))"
|
||||
CFLAGS=-g -O0 -fPIC -Wall -W -I. -I./include "-D_U_=__attribute__((unused))"
|
||||
LIBISCSI_OBJ = lib/connect.o lib/crc32c.o lib/discovery.o lib/init.o lib/login.o lib/nop.o lib/pdu.o lib/scsi-command.o lib/scsi-lowlevel.o lib/socket.o lib/sync.o
|
||||
INSTALLCMD = /usr/bin/install -c
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "config.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@@ -98,6 +99,9 @@ iscsi_connect_async(struct iscsi_context *iscsi, const char *portal,
|
||||
return -1;
|
||||
|
||||
}
|
||||
#ifdef HAVE_SOCK_SIN_LEN
|
||||
s.ss_len = socksize;
|
||||
#endif
|
||||
|
||||
if (iscsi->fd == -1) {
|
||||
iscsi_set_error(iscsi, "Failed to open iscsi socket. "
|
||||
|
||||
Reference in New Issue
Block a user