Commit bfcf400
smack: dont compile ipv6 code unless ipv6 is configured
I want to be sure that ipv6-specific code
is not compiled in kernel binaries
if ipv6 is not configured.
[1] was getting rid of "unused variable" warning, but,
with that, it also mandated compilation of a handful ipv6-
specific functions in ipv4-only kernel configurations:
smk_ipv6_localhost, smack_ipv6host_label, smk_ipv6_check.
Their compiled bodies are likely to be removed by compiler
from the resulting binary, but, to be on the safe side,
I remove them from the compiler view.
[1]
Fixes: 00720f0 ("smack: avoid unused 'sip' variable warning")
Signed-off-by: Konstantin Andreev <andreev@swemel.ru>
Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>1 parent 2aad5cd commit bfcf400
2 files changed
Lines changed: 15 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
| 155 | + | |
155 | 156 | | |
156 | 157 | | |
157 | 158 | | |
| |||
162 | 163 | | |
163 | 164 | | |
164 | 165 | | |
| 166 | + | |
165 | 167 | | |
| 168 | + | |
166 | 169 | | |
167 | 170 | | |
168 | 171 | | |
| |||
175 | 178 | | |
176 | 179 | | |
177 | 180 | | |
| 181 | + | |
178 | 182 | | |
179 | 183 | | |
180 | 184 | | |
| |||
315 | 319 | | |
316 | 320 | | |
317 | 321 | | |
| 322 | + | |
318 | 323 | | |
| 324 | + | |
319 | 325 | | |
320 | 326 | | |
321 | 327 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2492 | 2492 | | |
2493 | 2493 | | |
2494 | 2494 | | |
| 2495 | + | |
2495 | 2496 | | |
2496 | 2497 | | |
2497 | 2498 | | |
| |||
2559 | 2560 | | |
2560 | 2561 | | |
2561 | 2562 | | |
| 2563 | + | |
2562 | 2564 | | |
2563 | 2565 | | |
2564 | 2566 | | |
| |||
2663 | 2665 | | |
2664 | 2666 | | |
2665 | 2667 | | |
| 2668 | + | |
2666 | 2669 | | |
2667 | 2670 | | |
2668 | 2671 | | |
| |||
2695 | 2698 | | |
2696 | 2699 | | |
2697 | 2700 | | |
| 2701 | + | |
2698 | 2702 | | |
2699 | 2703 | | |
2700 | 2704 | | |
| |||
3027 | 3031 | | |
3028 | 3032 | | |
3029 | 3033 | | |
3030 | | - | |
| 3034 | + | |
| 3035 | + | |
| 3036 | + | |
3031 | 3037 | | |
3032 | 3038 | | |
3033 | 3039 | | |
| |||
3047 | 3053 | | |
3048 | 3054 | | |
3049 | 3055 | | |
| 3056 | + | |
| 3057 | + | |
3050 | 3058 | | |
3051 | 3059 | | |
3052 | 3060 | | |
| |||
0 commit comments