|
| 1 | +// Licensed to the Apache Software Foundation (ASF) under one |
| 2 | +// or more contributor license agreements. See the NOTICE file |
| 3 | +// distributed with this work for additional information |
| 4 | +// regarding copyright ownership. The ASF licenses this file |
| 5 | +// to you under the Apache License, Version 2.0 (the |
| 6 | +// "License"); you may not use this file except in compliance |
| 7 | +// with the License. You may obtain a copy of the License at |
| 8 | +// |
| 9 | +// http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +// |
| 11 | +// Unless required by applicable law or agreed to in writing, |
| 12 | +// software distributed under the License is distributed on an |
| 13 | +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 14 | +// KIND, either express or implied. See the License for the |
| 15 | +// specific language governing permissions and limitations |
| 16 | +// under the License. |
| 17 | + |
| 18 | +// glibc >= 2.34 demoted the double-underscore resolver entry points |
| 19 | +// (__res_nsearch & friends) to non-default compat versions, so newly linked |
| 20 | +// binaries cannot bind them anymore. The prebuilt thirdparty krb5 archive |
| 21 | +// (dnsglue.o) still references __res_nsearch, which breaks the doris_be link |
| 22 | +// on Ubuntu 22.04 (glibc 2.35). Provide a thin forwarder to the public |
| 23 | +// res_nsearch entry point, which is the identical implementation (same |
| 24 | +// symbol address in libc). |
| 25 | + |
| 26 | +#include <resolv.h> |
| 27 | +#include <sys/types.h> |
| 28 | + |
| 29 | +int __res_nsearch(res_state statp, const char* dname, int class_, int type, |
| 30 | + unsigned char* answer, int anslen) { |
| 31 | + return res_nsearch(statp, dname, class_, type, answer, anslen); |
| 32 | +} |
0 commit comments