Commit c278d72b authored by H. Peter Anvin's avatar H. Peter Anvin
Browse files

selftests/bpf: replace "__auto_type" with "auto"



Replace instances of "__auto_type" with "auto" in:

	tools/testing/selftests/bpf/prog_tests/socket_helpers.h

This file does not seem to be including <linux/compiler_types.h>
directly or indirectly, so copy the definition but guard it with
!defined(auto).

Acked-by: default avatarEduard Zingerman <eddyz87@gmail.com>
Signed-off-by: default avatarH. Peter Anvin (Intel) <hpa@zytor.com>
parent 2a5b286b
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -17,11 +17,16 @@
#define VMADDR_CID_LOCAL 1
#endif

/* include/linux/compiler_types.h */
#if __STDC_VERSION__ < 202311L && !defined(auto)
# define auto __auto_type
#endif

/* include/linux/cleanup.h */
#define __get_and_null(p, nullvalue)                                           \
	({                                                                     \
		__auto_type __ptr = &(p);                                      \
		__auto_type __val = *__ptr;                                    \
		auto __ptr = &(p);					       \
		auto __val = *__ptr;                                           \
		*__ptr = nullvalue;                                            \
		__val;                                                         \
	})