-#define NDINIT(ndp, op, flags, segflg, namep, ctx) { \
+
+#if CONFIG_TRIGGERS
+/* Note: vnode triggers require more precise path operation (ni_op) */
+
+#define NDINIT(ndp, op, pop, flags, segflg, namep, ctx) { \
+ (ndp)->ni_cnd.cn_nameiop = op; \
+ (ndp)->ni_op = pop; \
+ (ndp)->ni_cnd.cn_flags = flags; \
+ if ((segflg) == UIO_USERSPACE) { \
+ (ndp)->ni_segflg = ((IS_64BIT_PROCESS(vfs_context_proc(ctx))) ? UIO_USERSPACE64 : UIO_USERSPACE32); \
+ } \
+ else { \
+ (ndp)->ni_segflg = segflg; \
+ } \
+ (ndp)->ni_dirp = namep; \
+ (ndp)->ni_cnd.cn_context = ctx; \
+ (ndp)->ni_flag = 0; \
+ (ndp)->ni_cnd.cn_ndp = (ndp); \
+}
+#else
+#define NDINIT(ndp, op, _unused_, flags, segflg, namep, ctx) { \