include $(TOPDIR)/rules.mk
PKG_NAME:=tgt
-PKG_VERSION:=1.0.53
-PKG_REV:=9764e0afd9a7115e356fc85569a780f9003c4eac
-PKG_RELEASE:=4
+PKG_VERSION:=1.0.61
+PKG_REV:=f13345e12f49e5bcae2cfd6c5c7d530b328753f0
+PKG_RELEASE:=1
PKG_USE_MIPS16:=0
PKG_SOURCE_PROTO:=git
+++ /dev/null
---- tgt-1.0.48.orig/usr/util.h 2014-06-04 15:03:53.000000000 +0300
-+++ tgt-1.0.48/usr/util.h 2014-06-04 15:17:48.548123039 +0300
-@@ -212,11 +212,6 @@
- */
- static inline int unmap_file_region(int fd, off_t offset, off_t length)
- {
--#ifdef FALLOC_FL_PUNCH_HOLE
-- if (fallocate(fd, FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE,
-- offset, length) == 0)
-- return 0;
--#endif
- return -1;
- }
-
---- tgt-1.0.48.orig/usr/Makefile 2014-06-04 15:03:53.000000000 +0300
-+++ tgt-1.0.48/usr/Makefile 2014-06-04 15:17:56.373670618 +0300
+diff --git a/usr/Makefile b/usr/Makefile
+index 1fae7e7..b05b970 100644
+--- a/usr/Makefile
++++ b/usr/Makefile
@@ -1,13 +1,13 @@
sbindir ?= $(PREFIX)/sbin
libdir ?= $(PREFIX)/lib/tgt
TGTD_OBJS += $(addprefix iscsi/, conn.o param.o session.o \
iscsid.o target.o chap.o sha1.o md5.o transport.o iscsi_tcp.o \
-@@ -25,8 +25,9 @@
+@@ -25,8 +25,9 @@ ifneq ($(SD_NOTIFY),)
CFLAGS += -DUSE_SYSTEMD
endif
TGTD_OBJS += bs_aio.o
LIBS += -laio
endif
-@@ -55,7 +56,7 @@
- LIBS += -lsystemd-daemon
+@@ -55,7 +56,7 @@ ifneq ($(SD_NOTIFY),)
+ LIBS += -lsystemd
endif
-PROGRAMS += tgtd tgtadm tgtimg
TGTD_OBJS += tgtd.o mgmt.o target.o scsi.o log.o driver.o util.o work.o \
concat_buf.o parser.o spc.o sbc.o mmc.o osd.o scc.o smc.o \
ssc.o libssc.o bs_rdwr.o bs_ssc.o \
-@@ -82,14 +83,8 @@
+@@ -82,14 +83,8 @@ tgtadm: $(TGTADM_OBJS)
-include $(TGTADM_DEP)
+diff --git a/usr/tgtd.h b/usr/tgtd.h
+index d8b2ac1..c6eee54 100644
--- a/usr/tgtd.h
+++ b/usr/tgtd.h
@@ -9,6 +9,10 @@
#endif
+#ifndef __WORDSIZE
-+#include <sys/user.h>
++#include <sys/reg.h>
+#endif
+
struct concat_buf;
#define NR_SCSI_OPCODES 256
+diff --git a/usr/util.h b/usr/util.h
+index 0e34c35..3e2e63b 100644
--- a/usr/util.h
+++ b/usr/util.h
@@ -16,6 +16,10 @@
#include <linux/types.h>
+#ifndef __WORDSIZE
-+#include <sys/user.h>
++#include <sys/reg.h>
+#endif
+
#include "be_byteshift.h"
#define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y))
---- a/usr/libssc.c
-+++ b/usr/libssc.c
-@@ -23,6 +23,7 @@
- #include <string.h>
- #include <unistd.h>
- #include <stdio.h>
-+#include <fcntl.h>
- #include "bs_ssc.h"
- #include "ssc.h"
- #include "be_byteshift.h"