Skip to content

Commit fae471c

Browse files
committed
[Build][x86_64] Fedora v34 api fix detecting RHEL MINOR 99
1 parent 549c533 commit fae471c

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

x86_64/corefreqk.c

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24013,7 +24013,8 @@ static int CoreFreqK_mmap(struct file *pfile, struct vm_area_struct *vma)
2401324013
{
2401424014
unsigned long reqSize = vma->vm_end - vma->vm_start;
2401524015
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0) \
24016-
|| (defined(RHEL_MAJOR) && (RHEL_MAJOR >= 9) && (RHEL_MINOR >= 5))
24016+
|| (defined(RHEL_MAJOR) && (RHEL_MAJOR >= 9) \
24017+
&& (RHEL_MINOR >= 5) && (RHEL_MINOR < 99))
2401724018
vm_flags_t vm_ro = VM_READ | VM_DONTEXPAND;
2401824019
vm_flags_t vm_rw = VM_READ | VM_WRITE | VM_DONTEXPAND;
2401924020
#endif
@@ -24030,7 +24031,8 @@ static int CoreFreqK_mmap(struct file *pfile, struct vm_area_struct *vma)
2403024031
}
2403124032

2403224033
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0) \
24033-
|| (defined(RHEL_MAJOR) && (RHEL_MAJOR >= 9) && (RHEL_MINOR >= 5))
24034+
|| (defined(RHEL_MAJOR) && (RHEL_MAJOR >= 9) \
24035+
&& (RHEL_MINOR >= 5) && (RHEL_MINOR < 99))
2403424036
vm_flags_reset_once(vma, vm_ro);
2403524037
#else
2403624038
vma->vm_flags = VM_READ | VM_DONTEXPAND;
@@ -24053,7 +24055,8 @@ static int CoreFreqK_mmap(struct file *pfile, struct vm_area_struct *vma)
2405324055
}
2405424056

2405524057
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0) \
24056-
|| (defined(RHEL_MAJOR) && (RHEL_MAJOR >= 9) && (RHEL_MINOR >= 5))
24058+
|| (defined(RHEL_MAJOR) && (RHEL_MAJOR >= 9) \
24059+
&& (RHEL_MINOR >= 5) && (RHEL_MINOR < 99))
2405724060
vm_flags_reset_once(vma, vm_rw);
2405824061
#else
2405924062
vma->vm_flags = VM_READ | VM_WRITE | VM_DONTEXPAND;
@@ -24081,7 +24084,8 @@ static int CoreFreqK_mmap(struct file *pfile, struct vm_area_struct *vma)
2408124084
}
2408224085

2408324086
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0) \
24084-
|| (defined(RHEL_MAJOR) && (RHEL_MAJOR >= 9) && (RHEL_MINOR >= 5))
24087+
|| (defined(RHEL_MAJOR) && (RHEL_MAJOR >= 9) \
24088+
&& (RHEL_MINOR >= 5) && (RHEL_MINOR < 99))
2408524089
vm_flags_reset_once(vma, vm_ro);
2408624090
#else
2408724091
vma->vm_flags = VM_READ | VM_DONTEXPAND;
@@ -24113,7 +24117,8 @@ static int CoreFreqK_mmap(struct file *pfile, struct vm_area_struct *vma)
2411324117
}
2411424118

2411524119
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0) \
24116-
|| (defined(RHEL_MAJOR) && (RHEL_MAJOR >= 9) && (RHEL_MINOR >= 5))
24120+
|| (defined(RHEL_MAJOR) && (RHEL_MAJOR >= 9) \
24121+
&& (RHEL_MINOR >= 5) && (RHEL_MINOR < 99))
2411724122
vm_flags_reset_once(vma, vm_ro);
2411824123
#else
2411924124
vma->vm_flags = VM_READ | VM_DONTEXPAND;
@@ -24144,7 +24149,8 @@ static int CoreFreqK_mmap(struct file *pfile, struct vm_area_struct *vma)
2414424149
}
2414524150

2414624151
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0) \
24147-
|| (defined(RHEL_MAJOR) && (RHEL_MAJOR >= 9) && (RHEL_MINOR >= 5))
24152+
|| (defined(RHEL_MAJOR) && (RHEL_MAJOR >= 9) \
24153+
&& (RHEL_MINOR >= 5) && (RHEL_MINOR < 99))
2414824154
vm_flags_reset_once(vma, vm_rw);
2414924155
#else
2415024156
vma->vm_flags = VM_READ | VM_WRITE | VM_DONTEXPAND;

0 commit comments

Comments
 (0)