artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fdc132c
)
add check_add_overflow() for 6.6.29 drm
author
jsg
<jsg@openbsd.org>
Mon, 29 Apr 2024 06:06:46 +0000
(06:06 +0000)
committer
jsg
<jsg@openbsd.org>
Mon, 29 Apr 2024 06:06:46 +0000
(06:06 +0000)
sys/dev/pci/drm/include/linux/overflow.h
patch
|
blob
|
history
diff --git
a/sys/dev/pci/drm/include/linux/overflow.h
b/sys/dev/pci/drm/include/linux/overflow.h
index
93615be
..
f417032
100644
(file)
--- a/
sys/dev/pci/drm/include/linux/overflow.h
+++ b/
sys/dev/pci/drm/include/linux/overflow.h
@@
-8,4
+8,8
@@
#define struct_size(p, member, n) \
(sizeof(*(p)) + ((n) * (sizeof(*(p)->member))))
+#if defined(__clang__) || (defined(__GNUC__) && __GNUC__ >= 5)
+#define check_add_overflow(x, y, sum) __builtin_add_overflow(x, y, sum)
+#endif
+
#endif