thanks it worked on newer ubuntu it compile e2 witout error, but now for tvheadend i get:
Starting Tvheadhead build
==============================

Repository : https://github.com/tvheadend/tvheadend.git
Revision : 4931c0544885371b85146efad4eacd9683ba3dad
Diff : 1

Updating archived Tvheadend git... done.
Checking out HEAD... done.
Copying local git content to build environment... done.
Checking out revision 4931c0544885371b85146efad4eacd9683ba3dad...error: Your local changes to the following files would be overwritten by checkout:
src/webui/static/icons/control_repeat_blue.png
src/webui/static/icons/hires/airplane.png
src/webui/static/icons/hires/ambulance.png
src/webui/static/icons/hires/american_football.png
src/webui/static/icons/hires/artist_pallette.png
src/webui/static/icons/hires/automobile.png
src/webui/static/icons/hires/baby.png
src/webui/static/icons/hires/ballot_box_with_ballot.png
src/webui/static/icons/hires/baseball.png
src/webui/static/icons/hires/basketball_and_hoop.png
src/webui/static/icons/hires/beach_with_umbrella.png
src/webui/static/icons/hires/bow_and_arrow.png
src/webui/static/icons/hires/boxing_glove.png
src/webui/static/icons/hires/cactus.png
src/webui/static/icons/hires/castle.png
src/webui/static/icons/hires/chart_with_upwards_trend.png
src/webui/static/icons/hires/clapper_board.png
src/webui/static/icons/hires/collision_symbol.png
src/webui/static/icons/hires/construction_worker.png
src/webui/static/icons/hires/cooking.png
src/webui/static/icons/hires/couch_and_lamp.png
src/webui/static/icons/hires/dancer.png
src/webui/static/icons/hires/elephant.png
src/webui/static/icons/hires/extraterrestrial_alien.png
src/webui/static/icons/hires/face_with_tears_of_joy.png
src/webui/static/icons/hires/family.png
src/webui/static/icons/hires/film_frames.png
src/webui/static/icons/hires/fishing_pole_and_fish.png
src/webui/static/icons/hires/game_die.png
src/webui/static/icons/hires/ghost.png
src/webui/static/icons/hires/graduation_cap.png
src/webui/static/icons/hires/grinning_face.png
src/webui/static/icons/hires/high_heeled_shoe.png
src/webui/static/icons/hires/horse_face.png
src/webui/static/icons/hires/house_with_garden.png
src/webui/static/icons/hires/ice_skate.png
src/webui/static/icons/hires/left_pointing_magnifying_glass.png
src/webui/static/icons/hires/link_symbol.png
src/webui/static/icons/hires/martial_arts_uniform.png
src/webui/static/icons/hires/microphone.png
src/webui/static/icons/hires/microscope.png
src/webui/static/icons/hires/military_medal.png
src/webui/static/icons/hires/money_with_wings.png
src/webui/static/icons/hires/musical_note.png
src/webui/static/icons/hires/newspaper.png
src/webui/static/icons/hires/no_one_under_eighteen_symbol.png
src/webui/static/icons/hires/paw_prints.png
src/webui/static/icons/hires/pencil.png
src/webui/static/icons/hires/performing_arts.png
src/webui/static/icons/hires/person_doing_cartwheel.png
src/webui/static/icons/hires/person_in_lotus_position.png
src/webui/static/icons/hires/person_lifting_weights.png
src/webui/static/icons/hires/personal_computer.png
src/webui/static/icons/hires/place_of_worship.png
src/webui/static/icons/hires/police_officer.png
src/webui/static/icons/hires/racing_car.png
src/webui/static/icons/hires/racing_motorcycle.png
src/webui/static/icons/hires/radio.png
src/webui/static/icons/hires/red_heart.png
src/webui/static/icons/hires/selfie.png
src/webui/static/icons/hires/shopping_trolley.png
src/webui/static/icons/hires/skier.png
src/webui/static/icons/hires/skull.png
src/webui/static/icons/hires/soccer_ball.png
src/webui/static/icons/hires/spade_suit.png
src/webui/static/icons/hires/speaking_head_in_silhouette.png
src/webui/static/icons/hires/speech_balloon.png
src/webui/static/icons/hires/sports_medal.png
src/webui/static/icons/hires/spy.png
src/webui/static/icons/hires/squared_new.png
src/webui/static/icons/hires/sun_behind_cloud.png
src/webui/static/icons/hires/swimmer.png
src/webui/static/icons/hires/television.png
src/webui/static/icons/hires/tennis_racquet_and_ball.png
src/webui/static/icons/hires/unicorn_face.png
src/webui/static/icons/hires/wrestlers.png
src/webui/static/icons/plugin_disabled.png
src/webui/static/img/doc/introduction/screenshot.png
Please commit your changes or stash them before you switch branches.
Aborting
done.
Applying diff-1 patch...
patching file Makefile
Hunk #1 FAILED at 97.
1 out of 1 hunk FAILED -- saving rejects to file Makefile.rej
patching file configure
Hunk #1 succeeded at 117 (offset 7 lines).
Hunk #2 succeeded at 215 (offset 54 lines).
Hunk #3 succeeded at 797 (offset 128 lines).
patching file src/tvheadend.h
Hunk #1 succeeded at 64 (offset -6 lines).
Hunk #2 succeeded at 351 with fuzz 1 (offset -520 lines).
patching file src/input/mpegts.c
patching file src/input/mpegts.h
Hunk #1 succeeded at 75 (offset 2 lines).
patching file src/input/mpegts/satip/satip.c
Hunk #1 succeeded at 887 (offset 82 lines).
Hunk #2 succeeded at 1365 (offset 90 lines).
patching file src/input/mpegts/satip/satip.h
patching file src/main.c
Hunk #1 FAILED at 82.
Hunk #2 succeeded at 804 with fuzz 1 (offset 62 lines).
Hunk #3 succeeded at 875 (offset 66 lines).
Hunk #4 succeeded at 1008 (offset 68 lines).
Hunk #5 succeeded at 1358 (offset 78 lines).
1 out of 5 hunks FAILED -- saving rejects to file src/main.c.rej
make/tvheadend.mk:28: recipe for target '/opt/buildsystem/.deps/tvheadend.do_prepare' failed
make: *** [/opt/buildsystem/.deps/tvheadend.do_prepare] Error 1



main.c.rej:
--- src/main.c
+++ src/main.c
@@ -82,6 +82,7 @@
#include <openssl/err.h>
#include <openssl/rand.h>
#include <openssl/engine.h>
+#include <stropts.h>

pthread_t main_tid;