in kernel v4.7.10: extern unsigned int __pure full_name_hash(const char *, unsigned int); in kernel v4.8.0: extern unsigned int __pure full_name_hash(const void *salt, const char *, unsigned int);
This commit is contained in:
@@ -170,8 +170,11 @@ FILLDIR_RETURN_TYPE my_actor(struct dir_context *ctx, const char *name,
|
|||||||
} else {
|
} else {
|
||||||
if ((namelen == 8) && (strncmp(name, "base.apk", namelen) == 0)) {
|
if ((namelen == 8) && (strncmp(name, "base.apk", namelen) == 0)) {
|
||||||
struct apk_path_hash *pos, *n;
|
struct apk_path_hash *pos, *n;
|
||||||
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 8, 0)
|
||||||
|
unsigned int hash = full_name_hash(dirpath, strlen(dirpath));
|
||||||
|
#else
|
||||||
unsigned int hash = full_name_hash(NULL, dirpath, strlen(dirpath));
|
unsigned int hash = full_name_hash(NULL, dirpath, strlen(dirpath));
|
||||||
|
#endif
|
||||||
list_for_each_entry(pos, &apk_path_hash_list, list) {
|
list_for_each_entry(pos, &apk_path_hash_list, list) {
|
||||||
if (hash == pos->hash) {
|
if (hash == pos->hash) {
|
||||||
pos->exists = true;
|
pos->exists = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user