Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 838312a5 authored by Michael Bestas's avatar Michael Bestas
Browse files

ANDROID: fix BIT() redefinition



Commit fea30ad1 ("ANDROID: preserve CRC for some DRM functions")
caused the BIT() macro to be redefined because vdso/bits.h is included
through vdso/datapage.h in some other files.

Move the __GENKSYMS__ BIT() check to vdso/bits.h in order to fix this.

Fixes: fea30ad1 ("ANDROID: preserve CRC for some DRM functions")
Change-Id: I767d75e7e40b5acfa9b66754c7b2b74879a28de5
Signed-off-by: default avatarMichael Bestas <mkbestas@lineageos.org>
parent 6369256a
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -3,8 +3,8 @@
#define __LINUX_BITS_H

#include <linux/const.h>
#ifdef __GENKSYMS__
#include <vdso/bits.h>
#ifdef __GENKSYMS__
/*
 * Old version of this macro to preserve the CRC signatures of some drm symbols.
 * Crazy but true...
@@ -14,7 +14,6 @@
#else
#include <asm/bitsperlong.h>

#define BIT(nr)			(UL(1) << (nr))
#define BIT_ULL(nr)		(ULL(1) << (nr))
#define BIT_MASK(nr)		(UL(1) << ((nr) % BITS_PER_LONG))
#endif
+10 −0
Original line number Diff line number Diff line
@@ -2,6 +2,16 @@
#ifndef __VDSO_BITS_H
#define __VDSO_BITS_H

#ifdef __GENKSYMS__
/*
 * Old version of this macro to preserve the CRC signatures of some drm symbols.
 * Crazy but true...
 */
#define BIT(nr)			(1UL << (nr))
#else
#include <vdso/const.h>

#define BIT(nr)			(UL(1) << (nr))
#endif

#endif	/* __VDSO_BITS_H */