diff -Naur systemd-253.orig/src/basic/user-util.h systemd-253/src/basic/user-util.h
--- systemd-253.orig/src/basic/user-util.h	2023-02-16 00:41:52.000000000 +0530
+++ systemd-253/src/basic/user-util.h	2023-06-22 10:51:12.725465281 +0530
@@ -12,6 +12,47 @@
 #include <sys/types.h>
 #include <unistd.h>
 
+#ifndef MFD_CLOEXEC
+#define MFD_CLOEXEC	0x0001U
+#endif
+
+#ifndef QIF_DQBLKSIZE
+#define QIF_DQBLKSIZE_BITS 10
+#define QIF_DQBLKSIZE (1 << QIF_DQBLKSIZE_BITS)
+#endif
+
+#ifndef FSCRYPT_MAX_KEY_SIZE
+#define FSCRYPT_MAX_KEY_SIZE		64
+#endif
+
+#ifndef FS_KEY_DESCRIPTOR_SIZE
+#define FS_KEY_DESCRIPTOR_SIZE	8
+#endif
+
+#ifndef FSCRYPT_MODE_AES_256_XTS
+#define FSCRYPT_MODE_AES_256_XTS	1
+#endif
+
+#ifndef FS_ENCRYPTION_MODE_AES_256_XTS
+#define FS_ENCRYPTION_MODE_AES_256_XTS	FSCRYPT_MODE_AES_256_XTS
+#endif
+
+#ifndef FSCRYPT_MODE_AES_256_CTS
+#define FSCRYPT_MODE_AES_256_CTS		4
+#endif 
+
+#ifndef FS_ENCRYPTION_MODE_AES_256_CTS
+#define FS_ENCRYPTION_MODE_AES_256_CTS	FSCRYPT_MODE_AES_256_CTS
+#endif
+
+#ifndef FSCRYPT_POLICY_FLAGS_PAD_32
+#define FSCRYPT_POLICY_FLAGS_PAD_32		0x03
+#endif
+
+#ifndef FS_POLICY_FLAGS_PAD_32
+#define FS_POLICY_FLAGS_PAD_32	FSCRYPT_POLICY_FLAGS_PAD_32
+#endif
+
 /* Users managed by systemd-homed. See https://systemd.io/UIDS-GIDS for details how this range fits into the rest of the world */
 #define HOME_UID_MIN ((uid_t) 60001)
 #define HOME_UID_MAX ((uid_t) 60513)
diff -Naur systemd-253.orig/src/libsystemd/sd-netlink/netlink-message-nfnl.c systemd-253/src/libsystemd/sd-netlink/netlink-message-nfnl.c
--- systemd-253.orig/src/libsystemd/sd-netlink/netlink-message-nfnl.c	2023-02-16 00:41:52.000000000 +0530
+++ systemd-253/src/libsystemd/sd-netlink/netlink-message-nfnl.c	2023-06-22 10:48:14.204504782 +0530
@@ -12,6 +12,15 @@
 #include "netlink-types.h"
 #include "netlink-util.h"
 
+#ifndef NFPROTO_NETDEV
+#define NFPROTO_NETDEV	5
+#endif
+
+#ifndef NFPROTO_INET
+#define NFPROTO_INET		1
+#endif
+
+
 bool nfproto_is_valid(int nfproto) {
         return IN_SET(nfproto,
                       NFPROTO_UNSPEC,
diff -Naur systemd-253.orig/src/resolve/resolved-manager.c systemd-253/src/resolve/resolved-manager.c
--- systemd-253.orig/src/resolve/resolved-manager.c	2023-02-16 00:41:52.000000000 +0530
+++ systemd-253/src/resolve/resolved-manager.c	2023-06-22 10:48:14.204504782 +0530
@@ -41,6 +41,10 @@
 #include "string-util.h"
 #include "utf8.h"
 
+#ifndef IP_PMTUDISC_OMIT
+#define IP_PMTUDISC_OMIT		5
+#endif
+
 #define SEND_TIMEOUT_USEC (200 * USEC_PER_MSEC)
 
 static int manager_process_link(sd_netlink *rtnl, sd_netlink_message *mm, void *userdata) {
diff -Naur systemd-253.orig/src/shared/install-file.c systemd-253/src/shared/install-file.c
--- systemd-253.orig/src/shared/install-file.c	2023-02-16 00:41:52.000000000 +0530
+++ systemd-253/src/shared/install-file.c	2023-06-22 10:48:14.204504782 +0530
@@ -12,6 +12,10 @@
 #include "rm-rf.h"
 #include "sync-util.h"
 
+#ifndef RENAME_EXCHANGE
+#define RENAME_EXCHANGE		(1 << 1)	/* Exchange source and dest */
+#endif
+
 static int fs_make_very_read_only(int fd) {
         struct stat st;
         int r;
diff -Naur systemd-253.orig/src/shared/loop-util.c systemd-253/src/shared/loop-util.c
--- systemd-253.orig/src/shared/loop-util.c	2023-02-16 00:41:52.000000000 +0530
+++ systemd-253/src/shared/loop-util.c	2023-06-22 10:48:14.204504782 +0530
@@ -35,6 +35,10 @@
 #include "string-util.h"
 #include "tmpfile-util.h"
 
+#ifndef LOOP_SET_BLOCK_SIZE
+#define LOOP_SET_BLOCK_SIZE	0x4C09
+#endif
+
 static void cleanup_clear_loop_close(int *fd) {
         if (*fd < 0)
                 return;
diff --git a/src/basic/linux/sockios.h b/src/basic/linux/sockios.h
index 7d1bccb..4d8ed2a 100644
--- a/src/basic/linux/sockios.h
+++ b/src/basic/linux/sockios.h
@@ -22,6 +22,10 @@
 #include <asm/bitsperlong.h>
 #include <asm/sockios.h>
 
+#ifndef SIOCGSTAMPNS_OLD
+#define SIOCGSTAMPNS_OLD 0x8907                /* Get stamp (timespec) */
+#endif
+
 /* Linux-specific socket ioctls */
 #define SIOCINQ                FIONREAD
 #define SIOCOUTQ       TIOCOUTQ        /* output queue size (not sent + not acked) */
diff --git a/src/basic/terminal-util.c b/src/basic/terminal-util.c
index 02df893..3592128 100644
--- a/src/basic/terminal-util.c
+++ b/src/basic/terminal-util.c
@@ -52,6 +52,10 @@
 #include "time-util.h"
 #include "user-util.h"
 
+#ifndef TIOCGPTPEER
+#define TIOCGPTPEER    _IOR('T', 0x41, int) /* Safely open the slave */
+#endif
+
 static volatile unsigned cached_columns = 0;
 static volatile unsigned cached_lines = 0;
 
diff --git a/src/vmspawn/vmspawn-register.c b/src/vmspawn/vmspawn-register.c
index 20e6def..6b55f70 100644
--- a/src/vmspawn/vmspawn-register.c
+++ b/src/vmspawn/vmspawn-register.c
@@ -16,6 +16,10 @@
 #include "vmspawn-register.h"
 #include "varlink-util.h"
 
+#ifndef STDIN_FILENO
+#define STDIN_FILENO  0
+#endif
+
 int register_machine(
                 sd_bus *bus,
                 const char *machine_name,
                 
