Commit 04e2ec9
authored
libvncclient: replace gethostbyname() with getaddrinfo()
man gethostbyname:
"The gethostbyname*(), gethostbyaddr*(), herror(), and hstrerror() functions are obsolete. Applications should use getaddrinfo(3), getnameinfo(3), and gai_strerror(3) instead."
Furthermore, the man page states that `gethostbyname()` is MT-Unsafe, probably due to the fact that it retuns a pointer to static data. Thus, by using `getaddrinfo()`, we improve the multithreading soundness of LibVNCClient.1 parent 1d1153f commit 04e2ec9
1 file changed
Lines changed: 8 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
812 | 812 | | |
813 | 813 | | |
814 | 814 | | |
815 | | - | |
| 815 | + | |
816 | 816 | | |
817 | 817 | | |
818 | 818 | | |
| |||
824 | 824 | | |
825 | 825 | | |
826 | 826 | | |
827 | | - | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
828 | 834 | | |
829 | | - | |
830 | | - | |
831 | 835 | | |
832 | 836 | | |
833 | 837 | | |
834 | 838 | | |
835 | 839 | | |
836 | 840 | | |
837 | | - | |
838 | 841 | | |
839 | 842 | | |
840 | 843 | | |
| |||
0 commit comments