--- sfdisk/sfdisk.c	2004-01-13 14:03:11.000000000 +0100
+++ src/sfdisk.c	2017-10-20 00:52:01.334864123 +0200
@@ -133,10 +133,13 @@
  *
  * Note: we use 512-byte sectors here, irrespective of the hardware ss.
  */
-#if defined(__linux__) && !defined (__alpha__) && !defined (__ia64__) && !defined (__x86_64__) && !defined (__s390x__)
+#if defined(__linux__) && !defined (__alpha__) && !defined (__ia64__) && !defined (__x86_64__) && !defined (__s390x__) && !defined (__aarch64__)
 static
-_syscall5(int,  _llseek,  unsigned int,  fd, ulong, hi, ulong, lo,
-       loff_t *, res, unsigned int, wh);
+int _llseek(int fd, unsigned long hi, unsigned long lo, loff_t *res,
+	    unsigned int whence)
+{
+	return syscall(__NR__llseek, fd, hi, lo, res, whence);
+}
 #endif
 
 static int
@@ -145,7 +148,7 @@
     in = ((loff_t) s << 9);
     out = 1;
 
-#if defined(__linux__) && !defined (__alpha__) && !defined (__ia64__) && !defined (__x86_64__) && !defined (__s390x__)
+#if defined(__linux__) && !defined (__alpha__) && !defined (__ia64__) && !defined (__x86_64__) && !defined (__s390x__) && !defined (__aarch64__)
     if (_llseek (fd, in>>32, in & 0xffffffff, &out, SEEK_SET) != 0) {
 #else
     if ((out = lseek(fd, in, SEEK_SET)) != in) {
